mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-02 08:35:07 +08:00
7 lines
340 B
TypeScript
7 lines
340 B
TypeScript
// @dynamic
|
|
// A direct Object.keys call over a dynamic object has a checker-array type
|
|
// but a checked-dynamic value. Its predicate still cannot use void.
|
|
const pred: (n: string) => void = (n) => n;
|
|
console.log(Object.keys(JSON.parse('{"zero":0,"one":1}')).filter(pred).join(","));
|
|
// The callback's erased return makes this unsupported.
|