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

Examples fail to typecheck with compilerOptions.strict=true in tsconfig #4

Open
jyasskin opened this issue Nov 26, 2022 · 1 comment

Comments

@jyasskin
Copy link

Some of the fixes are easy, like adding : Component<{ item: number }> after const Sortable or :DragEventHandler after onDragStart, but some of the others are less convenient, like currentItems.indexOf(draggable.id) failing because Id includes both strings and numbers while currentItems is more precisely typed as just numbers.

@martinpengellyphillips
Copy link
Contributor

I deliberately didn't include typings in the examples because I think it adds unnecessary complexity for folks looking at them (if they are not used to typescript for example).

Maybe when creating fuller documentation adding them in would make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants