-
Notifications
You must be signed in to change notification settings - Fork 32
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
[Bug] cannot use strict typescript types #73
Comments
I played around a bit more, and I got the following to work: // any of those work:
export class Story extends SvelteComponentTyped<StoryProps> { }
export declare const Story: ComponentType<SvelteComponentTyped<StoryProps>>
export class Story extends SvelteComponentTyped<StoryProps, any, Slots> { }
export declare const Story: ComponentType<SvelteComponentTyped<StoryProps, any, Slots>>
// any of those don't:
export class Story extends SvelteComponentTyped<StoryProps, {}, Slots> { }
export declare const Story: ComponentType<SvelteComponentTyped<StoryProps, {}, Slots>>
export declare const Story: ComponentType<SvelteComponentTyped<StoryProps, {}>>
export class Story extends SvelteComponentTyped<StoryProps, {}> { } Looks like an easy fix, but I don't understand why the empty Object is not enough to satisfy the types. If approved I can create a pull request tomorrow |
I haven't tested |
Also seeing this, would be great to get a PR going because my stories are a sea of red squiggles atm |
@madeleineostoja the PR is #74 , until it is merged, I patched my project's types via declares in my app.d.ts |
Fixed in #74 |
Describe the bug
When i set
strict: true
in my tsconfig.json I get the following error in every stories file:Steps to reproduce the behavior
strict: true
in tsconfig.jsonExpected behavior
no error
Screenshots and/or logs
If applicable, add screenshots and/or logs to help explain your problem.
Environment
Additional context
The Problem lies in the types file, although I cannot figure out what it needs to be changed to
The text was updated successfully, but these errors were encountered: