sikanhe / gqtx

Code-first Typescript GraphQL Server without codegen or metaprogramming
458 stars 13 forks source link

TypeScript type definitions don't work in ESM projects #72

Closed andrew0 closed 9 months ago

andrew0 commented 10 months ago

When I try to import gqtx in a TypeScript project with the moduleResolution option set to nodenext, TypeScript can't find the correct type definitions: https://stackblitz.com/edit/typescript-dfnpmb?file=index.ts

image

I think this is because the package.json file for this library has "type": "module", but the TypeScript definition files use extensionless imports.

sikanhe commented 9 months ago

Will be fixed in 0.9.1: https://github.com/sikanhe/gqtx/pull/73

https://stackblitz.com/edit/typescript-bxurk2?file=package.json,index.ts