Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Svelte + Typescript = some error #265

Closed
pruginkin opened this issue Jul 2, 2020 · 3 comments
Closed

Svelte + Typescript = some error #265

pruginkin opened this issue Jul 2, 2020 · 3 comments
Labels
bug Something isn't working Fixed Fixed in master branch. Pending production release.

Comments

@pruginkin
Copy link

pruginkin commented Jul 2, 2020

<script lang="ts"> let w: any </script>
<svelte:window bind:innerWidth={w} />

Typescript error - Type '{ innerWidth: any }' is not assignable to type 'HTMLProps'.
Property 'innerWidth' does not exist on type 'HTMLProps'.ts(2322)
Screenshot_20200702_155243

dummdidumm pushed a commit that referenced this issue Jul 3, 2020
@dummdidumm dummdidumm added bug Something isn't working Fixed Fixed in master branch. Pending production release. labels Jul 3, 2020
@pruginkin
Copy link
Author

svelte:body bind has the same error

@jasonlyu123
Copy link
Member

I think that would be correct. Svelte doc doesn't mention you could do that and I tried it in REPL it only gets undefined.

@pruginkin
Copy link
Author

Yes, sorry, the documentation says so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fixed Fixed in master branch. Pending production release.
Projects
None yet
Development

No branches or pull requests

3 participants