Closed MangelMaxime closed 2 months ago
TypeScript documentation:
declare const NODES: readonly ["a", "button"]; type Primitives = { [E in (typeof NODES)[number]]: boolean; };
translates into
[<AllowNullLiteral>] [<Interface>] type Primitives = abstract member a: bool with get, set abstract member button: bool with get, set
Example of npm package using this features:
React or similar packages will use this kind of features.
An example of this kind of syntax is being used in @radix-ui/react-primitive
@radix-ui/react-primitive
TypeScript documentation:
translates into
Example of npm package using this features:
React or similar packages will use this kind of features.