-
Notifications
You must be signed in to change notification settings - Fork 198
Open
Description
Without TSSatisfiesExpression
/Users/me/project/node_modules/ast-types/lib/types.js:664
throw new Error("did not recognize object of type " +
^
Error: did not recognize object of type "TSSatisfiesExpression"
at Object.getFieldNames (/Users/me/project/node_modules/ast-types/lib/types.js:664:19)
at visitChildren (/Users/me/project/node_modules/ast-types/lib/path-visitor.js:184:36)
at PVp.visitWithoutReset (/Users/me/project/node_modules/ast-types/lib/path-visitor.js:166:20)
at visitChildren (/Users/me/project/node_modules/ast-types/lib/path-visitor.js:203:25)
at PVp.visitWithoutReset (/Users/me/project/node_modules/ast-types/lib/path-visitor.js:166:20)
at NodePath.each (/Users/me/project/node_modules/ast-types/lib/path.js:87:26)
at visitChildren (/Users/me/project/node_modules/ast-types/lib/path-visitor.js:178:18)
at PVp.visitWithoutReset (/Users/me/project/node_modules/ast-types/lib/path-visitor.js:166:20)
at visitChildren (/Users/me/project/node_modules/ast-types/lib/path-visitor.js:203:25)
at PVp.visitWithoutReset (/Users/me/project/node_modules/ast-types/lib/path-visitor.js:166:20)
Node.js v18.12.1
"typescript": "^4.9.5",
Example syntax
type Colors = "red" | "green" | "blue";
type RGB = [red: number, green: number, blue: number];
const palette = {
red: [255, 0, 0],
green: "#00ff00",
bleu: [0, 0, 255]
} satisfies Record<Colors, string | RGB>;
micschro, lazybean, acid-chicken, syuilo, chrisvdp and 4 more
Metadata
Metadata
Assignees
Labels
No labels