3 ms·
That did not compile for me with my TS settings; > Type '{ dev: boolean; readonly prod: void; }' is not assignable to type '{ prod: true; }' It's still a bad
by xsmasher 4y ago
That did not compile for me with my TS settings;
> Type '{ dev: boolean; readonly prod: void; }' is not assignable to type '{ prod: true; }'
It's still a bad solution though; it allows nonsense values like {dev:true, prod:true}.
- mmis1000 4y agoThat is because I forgot to assert the true as literal true, so it defaults to be boolean (where both true and false are allowed)