-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add TS types #3
base: main
Are you sure you want to change the base?
Add TS types #3
Conversation
I encountered the same situation and thought of monkey-patching the fact that TS still not support Didn't tested your solution yet, So it's a trade-off I guess ;) At least, if we keep the refactoring support, while shutting down TS complaint, it would still be a better situation. Thx! |
@JulianCataldo Nevertheless I think it's superior to Vite, the extra |
@justinfagnani Can you review this one? Thanks |
declare module '*.css' { | ||
const stylesheet: CSSStyleSheet; | ||
export default stylesheet; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JulianCataldo Have you tried this syntax instead? which is the PR I proposed.
You can't directly return a type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! I was fiddling with const
, var
, default
,… but couldn't recall the exact pattern, even though I'd seen it somewhere before. Thx
This commit adds TypeScript types to get rid of error such as :
@changesets/cli
package was also added to the project to ease up external contribution.