Tracks the TypeScript compatibility batch for object-literal parameter defaults and the standard Function instance surface, as part of #66 and #548.
The checker previously rejected valid defaults such as Record<string, unknown> = {} and string | { message?: string } = {} because annotated parameter defaults skipped the existing object-literal structural relation. It also modeled inherited constructor values and the builtin Function interface without length, prototype, or the ES2015 name field.
Implemented in ff2a44c:
- Route object-literal parameter defaults through the same structural relation used by other object-literal assignment sites, while retaining failures for incompatible nonempty defaults.
- Add
Function.length: number,Function.prototype: any, and ES2015 Core gatedFunction.name: stringto builtin and inherited-constructor Function shapes. - Respect explicit
libselection and target tiers;ES5andES2015.Collectionalone do not exposeFunction.name. - Preserve callable-to-
Functiondestructuring assignment through the checker-level intrinsic Function relation. - Add exact modern, ES5, component-lib, invalid-default, Function-cache, allocation-failure, and destructuring coverage.
Validation:
- Type checker: 4,383/4,383 tests pass in ReleaseFast.
- Full ReleaseFast build with JSC: 50/50 steps pass.
- Pinned Zod v4.5.2 core oracle: 39 diagnostics -> 34, removing five expected false positives with zero additions.
zig fmt --check,git diff --check, and focused Pickier pass.