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

Types file #352

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

julix-unity
Copy link

@julix-unity julix-unity commented Oct 26, 2024

Adding Types file as lib/react-quiz-component.d.ts and target in package.json

Closes #273

Credit to @d3vAdv3ntur3s for the writing of initial type file.

@julix-unity
Copy link
Author

julix-unity commented Oct 26, 2024

@wingkwong do you know if there's a good way to test that this works as expected before merging? -- also how would you feel about a bigger change that converts the project to TypeScript fully?

@julix-unity julix-unity force-pushed the julix91-add-types-file branch from a8ec9be to 9f1d428 Compare October 26, 2024 21:40
@julix-unity
Copy link
Author

Force pushed to use index.d.ts in dist folder instead.

@wingkwong
Copy link
Owner

dist should be generated. I think this file should be gone after build?

@julix-unity
Copy link
Author

dist should be generated. I think this file should be gone after build?

It's only generated if the project is in typescript and the right tsconfig settings are there. How would it auto generate the file if it doesn't have types in main files?

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

Successfully merging this pull request may close these issues.

Types for Typescript users of react-quiz-component (.d.ts)
3 participants