Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve Query and graphql types. Strict type check with Typescript. #1617
This PR switches the project to use
Also improved the types for the
One caveat this new strict mode has (which is a fair one IMO) is that decorators cause errors when used in this setup. They raise type errors in all cases where you define a lifecycle hook (see Microsoft/TypeScript#17989). Anyway I think we shouldn't be using decorators with Typescript, both because they are still not a standard, and second because they don't have the exactly same semantics as we intend to use them here (the idea is that we don't change the external API of a class when a decorator is applied, but this is not the case).
Sorry for the big PR, but this implied touching all the files since they all had some sort of error in strict mode.
Also let's discuss if we want to add this as part of the 2.1 beta or if this should be part of a new release 2.2 or something.