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
These are not the same types at all! The JS type assumes that the type is optional and defaults to null BUT the typescript example assumes the values default to undefined.
This has been the cause of a copy nasty validation bugs on our end because the type checker incorrectly tells you to change your default value to undefined, which causes our optional checks to fail.
Solution
No clue why the type exporter does this tbh...
The text was updated successfully, but these errors were encountered:
Problem Description
For example, for the
SveltyPicker
:When optional null types are exported using JSDoc like:
SveltyPicker.svelte
The resulting typescript types are:
SveltyPicker.svelte.d.ts
These are not the same types at all! The JS type assumes that the type is optional and defaults to
null
BUT the typescript example assumes the values default toundefined
.This has been the cause of a copy nasty validation bugs on our end because the type checker incorrectly tells you to change your default value to undefined, which causes our
optional
checks to fail.Solution
No clue why the type exporter does this tbh...
The text was updated successfully, but these errors were encountered: