mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-08 08:44:37 +08:00
A Pick or Omit view of a program class is held as a live class protocol, and generic methods called through it monomorphize against the class. Both checks read the view from the type's alias symbol, but a view named by a type alias (type View = Pick<Registry, "m">) carries the user's alias instead, so it mapped to a record of erased method fields that no instance converts to. classViewOf reads the alias declaration and sees the view through non-generic aliases, alias chains included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 lines
106 B
TypeScript
3 lines
106 B
TypeScript
import type { Registry } from "./registry.ts";
|
|
export interface Ctx { registry: Registry; label: string }
|