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

TypeScript type definitions #33

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DamianoMagrini
Copy link

@DamianoMagrini DamianoMagrini commented Jul 27, 2019

Added an index.d.ts file that contains type definitions (as requested by @sammkj in #28).

I have to admit that I didn't really check that everything is correct. Still, this is just a port of @types/react-helmet v4, so, as long as this is a port of react-helmet v4, they should be correct.

Maybe the file should be put inside src, and the scripts should be changed to copy the file at build time? I've seen that many repos have it in the root directory though.

(this is my first pull request I sincerely hope I haven't messed anything up)

Edit: closes #32.

Might still be quite broken
Instead of importing * as preact, index.d.ts now just imports preact.
@DamianoMagrini
Copy link
Author

I've just noticed that this is incompatible with Preact X. To make it work, JSX should be replaced by preact.JSX.
By the way, why are all tests failing? From the logs it looks like a certain /etc/init.d/xvfb is missing.

@Download
Copy link
Owner

I think there is probably some small issue with the tests, because they worked when I last looked at this.

Please become a maintainer, then you can merge it yourself :) Join the discussion at #34

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.

[Question] - Typescript?
2 participants