Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Refactor TS declaration files #628

Merged
merged 1 commit into from
Jun 15, 2020

Conversation

danielrearden
Copy link
Collaborator

@danielrearden danielrearden commented Jun 10, 2020

This PR moves the type declarations inside src and splits them up by file. It also moves tsconfig.ts into the project root and makes some necessary changes to keep dtslint working.

@coveralls
Copy link

coveralls commented Jun 10, 2020

Coverage Status

Coverage remained the same at 99.88% when pulling 9df7fa8 on danielrearden:refactor-typings into 0f74f05 on graphql:master.

resources/check-ts.js Outdated Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
@IvanGoncharov
Copy link
Member

@danielrearden I need to think about dtslint and I will try to find correct solution in graphql-js so you can latter port it here.

Meanwhile, it would be great if you can ensure that we have types on all function arguments (except inline functions and functions defined as object properties) since TS will require us to define it anyway but TS conversion diff will be way smaller.
You can try to find some set of options that will force ESLint to detect such places (not really necessary here but we can use this approach for larger code base in graphql-js).
Importantly don't type functions unless required by TS.

@IvanGoncharov
Copy link
Member

@danielrearden I merged #637 and it should unblock this PR.
Can you please rebase?

@danielrearden danielrearden force-pushed the refactor-typings branch 2 times, most recently from 227093d to d1e3279 Compare June 14, 2020 23:51
@danielrearden
Copy link
Collaborator Author

@IvanGoncharov Rebased!

tsconfig.json Outdated Show resolved Hide resolved
@IvanGoncharov
Copy link
Member

@danielrearden Left a couple of comments, everything else looks good 👍

@IvanGoncharov IvanGoncharov merged commit 975ba2c into graphql:master Jun 15, 2020
@danielrearden danielrearden deleted the refactor-typings branch June 15, 2020 16:41
@IvanGoncharov IvanGoncharov added the PR: polish 💅 PR doesn't change public API or any observed behaviour label Jul 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR: polish 💅 PR doesn't change public API or any observed behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants