mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-27 06:43:19 +08:00
12 lines
385 B
TypeScript
12 lines
385 B
TypeScript
// @dynamic
|
|
// An overload can present an island array as static. The callback still uses
|
|
// the void ABI, so the engine must not silently receive an erased return.
|
|
function values(): number[];
|
|
function values(): any {
|
|
return [0, 1];
|
|
}
|
|
|
|
const pred: (n: number) => void = (n) => n;
|
|
console.log(values().filter(pred).join(","));
|
|
// The callback's erased return makes this unsupported.
|