You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
consttypes=scope({base: {foo: "true",bar: "false",},// 1:1 with TSfoo: "base['foo']",// Allow more convenient dot notation from JSbar: "base.bar",});
Should check that the accessed expression extends keyof the base type, otherwise should result in a semantic validation error.
Reacted by Drew Powers, Grégory Houllier, Alexander Mangel, AP-ChrisStone, mippbipp, Andre Morise, Matthew Tao, Bo Lingen, Brian Miller, Gwenn Le Bihan and 4 more
Activity
drwpwrs commentedon Feb 8, 2025
Would be great for generics.