-
Notifications
You must be signed in to change notification settings - Fork 147
Conversation
I think, the package.json need add some script how: Example using: {
scripts: {
...,
"build": "babel src --presets @babel/preset-env --out-dir dist && npm run build:types",
"build:types": "cpy 'index.d.ts' dist"
}
} What do you think about this? |
I was thinking the same but, when I ran npm run build and did the NPM link it seemed to be working so I'm not 100% sure if we need the copying of the index.d.ts, however tho i think if we don't need the copy i need to change: package.json {
"types": "./index.d.ts"
...package.json
} also EDIT pushed commit d53132d fixing the package.json types pointer |
Ok!!!!! Thanks! |
Codecov Report
@@ Coverage Diff @@
## master #597 +/- ##
=============================
=============================
Continue to review full report at Codecov.
|
@johnymontana, could you please tell me what will happen to this PR, loads of people are using my fork because of this atm. but given #608 by @michaeldgraham. I would like to know if this is a lost cause, I do understand the focus is the new fancy typescript version, but to support people who can't migrate yet should we merge this PR into this repo, or should I abandon this PR and maybe work with @michaeldgraham instead and move my fork to target his repository? I feel its a shame if people do not get first class IDE support for the tools they use on a daily basis, also given all the feedback I've received from the community so far. |
Hey @Nopzen - thanks for pinging again and thanks for your patience on this. Yes, I think we can get this in now since it's been in progress for a while and validated with others using your fork and the reviews here. I'll merge this now and then put this out in a patch release in the next few days. Thanks so much for working on this! |
Thanks @johnymontana should their be raised any issues with these types tag me in such issues i Will get a look at it. |
* Add TypeScript definitions to package * fix: package.json types pointer * add support for schemaTransformers * add: definitions for assertSchema * add: experimental flag to AugmentSchemaConfig interface * update: signature for neo4jgraphql types (cherry picked from commit 84d54a3)
This is now available in v2.19.4 Thanks again @Nopzen and others for working on this! |
This PR aims to close #275 by adding a simple index.d.ts to the package repository.
This PR have been some underway first looking at targeting the DefinitelyTyped mono repository, but after small conversation with @johnymontana in the issue we decided to add a simple
index.d.ts
file here.Further more this PR have been heavily discussed by users of these definitions here: https://github.com/Nopzen/DefinitelyTyped/pull/1
I created a small test locally to check if the types works as intended by npm linking the neo4j-graphql-js to the test, the screenshots below shows the integration with the VSCode TypeScript language server.
I'm very open to feedback and will gladly update any changes the community or maintainers might have.