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
<script>
classOrder {document?: string;}let order =newOrder();
</script>
<MaskInputbind:value={order.document}
alwaysShowMaskmaskChar="_"mask="0000-000000-00000" />
it would be nice to add TypeScript solving problems like this:
(JSX attribute) value?: undefined
Type 'string | undefined' is not assignable to type 'undefined'.
Type 'string' is not assignable to type 'undefined'.ts(2322)
Thank you!
EDIT:
To temporary solve the problem I just changed line 5 from export let value = undefined; to export let value = ""; and now the component works fine in a Sapper application with TypeScript support.
The text was updated successfully, but these errors were encountered:
Hi.
Supposing this example:
it would be nice to add TypeScript solving problems like this:
Thank you!
EDIT:
To temporary solve the problem I just changed line 5 from
export let value = undefined;
toexport let value = "";
and now the component works fine in a Sapper application with TypeScript support.The text was updated successfully, but these errors were encountered: