Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Provide TypeScript declarations out-of-the-box #1381

Closed
benmccann opened this issue Aug 9, 2020 · 4 comments · Fixed by #1402
Closed

Provide TypeScript declarations out-of-the-box #1381

benmccann opened this issue Aug 9, 2020 · 4 comments · Fixed by #1402

Comments

@benmccann
Copy link
Member

Right now people have to copy the below file into their project. We should generate it automatically:

https://github.com/babichjacob/sapper-typescript-graphql-template/blob/main/types/%40sapper/index.d.ts

@babichjacob
Copy link
Member

Is it the right idea to make this only be done after running a Sapper-oriented fork of scripts/setupTypeScript.js that gets bundled with the default Rollup and Webpack templates?

@benmccann
Copy link
Member Author

benmccann commented Aug 12, 2020

I was thinking that it could live in something like create_app and always happen. People don't generally open up their src/node_modules/@sapper directory, so it will be hidden from them and not affect them if they're not using TypeScript. And it requires no user action for the people that do use TypeScript

@benmccann
Copy link
Member Author

I sent #1402 to provide TypeScript declarations automatically

We did get a request to add a scripts/setupTypeScript.js to sapper-template. That might not be a bad idea to do as a next step if anyone wants to take a stab at it

@martonlederer
Copy link

I might take a look at it and see if I can do it @benmccann

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants