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

Add TS declaration file and testing #2

Merged
merged 1 commit into from
May 19, 2021

Conversation

francisdaigle
Copy link
Contributor

No description provided.

@francisdaigle francisdaigle force-pushed the feature/add-ts-support branch 4 times, most recently from 1e16ede to e78cc7a Compare May 18, 2021 23:51
Copy link
Owner

@hsynlms hsynlms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR!

I have put some comments for some lines.

Unfortunately, I have no experience with TypeScript. I just did not get that why you wrote some tests in TypeScript? the test.js file in the root directory already contains more comprehensive tests in vanilla js. I think that it's not necessary to rewrite them in TypeScript.

@@ -0,0 +1,7 @@
{
"extends": "../node_modules/fastify-tsconfig/tsconfig.json",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -1 +0,0 @@
github: hsynlms
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any specific reason to remove the file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason! Can be replaced 👍

@francisdaigle
Copy link
Contributor Author

francisdaigle commented May 19, 2021

Hi @hsynlms :)

the test.js file in the root directory already contains more comprehensive tests in vanilla js. I think that it's not necessary to rewrite them in TypeScript.

Possibly not. The TS tests do not replicate the JS tests in their entirety -- just the basics. Very helpful when determining/illustrating what should (and should not) be included in the declaration file. The tests can be removed if you would prefer.

Copy link
Owner

@hsynlms hsynlms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @francisdaigle :)

Thank you again for your efforts. Now it looks better. Please feel free to open new PR for TypeScript testing changes.

The last remained thing I am going to ask you that the library is Standard JS compatible. Can you also make the changes compatible as well?

@hsynlms hsynlms merged commit 1379131 into hsynlms:master May 19, 2021
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.

2 participants