Graphiql: Typescript declarations

Created on 2 Oct 2017  路  3Comments  路  Source: graphql/graphiql

Would a typescript declarations file be welcome as part of the project? I have looked for one online and so far can't find one. Would it be useful to submit one as a PR?

Most helpful comment

+1 for full typescript support.

All 3 comments

@samrae7 I don't see why not, but what's the purpose? Just wanted to understand more since I'm a complete TypeScript noob :D

@asiandrummer thanks for the reply

On reflection the use case is limited, and even then I think someone could easily add the types themselves. It would be for people who want to add the graphiQL component to existing typescript projects, and then not have to declare eg. the prop type ( eg. fetcher: () => Promise) themselves. However, like I say people could add that quite easily themselves if they really needed to make it part of a ts project.

In any case I realised that for what I wanted it for, I could just have it as a separate js repo that I can fire up when I need it ( rather than adding it to the main app, which is written in ts). I think I will close this issue, as it makes sense why no one else has needed it up until now.

+1 for full typescript support.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

OlegIlyenko picture OlegIlyenko  路  17Comments

ElijahLynn picture ElijahLynn  路  10Comments

majkrzak picture majkrzak  路  12Comments

divyenduz picture divyenduz  路  21Comments

divyenduz picture divyenduz  路  16Comments