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
I created a new Svelte + TS project. I started to write my stores, and I spent quite some time figuring out why Readable<MyType | null> didn't work. After some research I discovered it was because strict was not enabled.
I know TypeScript but I'm not the ultimate expert, and finding why null was ignored took me quite some time. If I decide to use TypeScript, is because I want it to check my types. Strict mode should be set as the default option, as it is in the default configuration created by tsc --init.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I created a new Svelte + TS project. I started to write my stores, and I spent quite some time figuring out why
Readable<MyType | null>
didn't work. After some research I discovered it was becausestrict
was not enabled.I know TypeScript but I'm not the ultimate expert, and finding why
null
was ignored took me quite some time. If I decide to use TypeScript, is because I want it to check my types. Strict mode should be set as the default option, as it is in the default configuration created bytsc --init
.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions