mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-28 06:53:42 +08:00
Message types from SDK declarations often use shapes scriptc refused:
- `{ [key: string]: any }` and `Dictionary<any>` (also a bare
`Dictionary<T = any>`): the overflow values are checked-dynamic, like
`Record<string, unknown>`'s.
- `any[]` members an interface, type literal or class declares, also
optional or nullable: the checked-dynamic array, as `unknown[]` maps.
An object literal's inferred `any[]` member keeps its existing story.
- A class a types-only package declares with public fields only (aws-sdk's
`declare class PresignedPost { url: string; fields: Fields }`, with a
merged namespace of types): it describes JSON data and is never
constructed, so it maps structurally like an interface.
- `Pick<C, K>` and `Omit<C, K>` over a program class, when the view exposes
a method: like an interface the class matches, it keeps a live receiver,
so calls through the view run on the instance.
A record blocked by a member deep inside it now names that member's path
(`member 'poll().jobs[].handle' has type ...`) instead of the outermost
member only; a member holding `any` is named itself.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>