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 types please #434

Closed
nojvek opened this issue Jun 24, 2019 · 4 comments
Closed

Typescript types please #434

nojvek opened this issue Jun 24, 2019 · 4 comments

Comments

@nojvek
Copy link

@nojvek nojvek commented Jun 24, 2019

This is a great lib but hard to figure out the api. I would love to use a version I can type check against.

It would be great to have typescript declaration types built into the repo via "types" in package.json.

https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html

@wheresrhys

This comment has been minimized.

Copy link
Owner

@wheresrhys wheresrhys commented Jun 27, 2019

Someone defined types for an earlier verson of the library over in https://www.npmjs.com/package/@types/fetch-mock. You are welcome to use/update them

fetch-mock, however, is not a typescript project, so this issue is out of scope here.

@wheresrhys wheresrhys closed this Jun 27, 2019
@nojvek

This comment has been minimized.

Copy link
Author

@nojvek nojvek commented Jun 28, 2019

It doesn’t need to be a typescript project. You could just have a simple types.d.ts file here and a simple update to package.json

This ensures the types are compatible with the version that is installed.

So people don’t need to download two packages for the same thing.

@wheresrhys wheresrhys reopened this Jul 17, 2019
@wheresrhys

This comment has been minimized.

Copy link
Owner

@wheresrhys wheresrhys commented Jul 17, 2019

If you want to submit a PR to do that then I'll have a look and decide if it's too much of a maintenance overhead.

@wheresrhys

This comment has been minimized.

Copy link
Owner

@wheresrhys wheresrhys commented Oct 27, 2019

@nojvek This is now done in v8.0.0-alpha.9 #459. Would appreciate it if you could try it out

@wheresrhys wheresrhys closed this Oct 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.