mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-22 05:59:31 +08:00
10 lines
315 B
TypeScript
10 lines
315 B
TypeScript
// comptime bakes at lowering: a REACHED comptime callback that throws
|
|
// fails the build at compile time (the unreached twin in
|
|
// tests/corpus/420-dead-strip-modules never evaluates at all).
|
|
function boom(): number {
|
|
return comptime((): number => {
|
|
throw "evaluated after all";
|
|
});
|
|
}
|
|
console.log(boom());
|