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 TypeScript type definitions. #84

Open
dkushner opened this issue Mar 18, 2019 · 4 comments
Open

Add TypeScript type definitions. #84

dkushner opened this issue Mar 18, 2019 · 4 comments

Comments

@dkushner
Copy link

Went looking to use found-relay with a TypeScript/React project and was unable to do so as all of the examples depend on farce and its history management, which does not have TypeScript type definitions available (that I could find).

@taion
Copy link
Contributor

taion commented Mar 18, 2019

I'd be happy to take a PR adding them.

Though note that you're not going to be directly dealing with the Farce API much in using Found.

@dkushner
Copy link
Author

@taion: Yeah, I'd noticed as much from the documentation, which is why it was a bit frustrating. Really small piece of the puzzle but lack of types stopped me. I'll see if I can at least get a decent start point out of dts-gen and go from there.

@taion
Copy link
Contributor

taion commented Mar 18, 2019

Why do the types or lack thereof matter if you're not directly interacting with the library?

@dkushner
Copy link
Author

@taion Per the example project for found-relay, I need to be able to instantiate the history protocol instance and import several other components.

import HashProtocol from 'farce/lib/HashProtocol';
import queryMiddleware from 'farce/lib/queryMiddleware';

This causes TypeScript to complain, obviously, because it can't find type definitions for these imports.

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

No branches or pull requests

2 participants