Final Typescript Support
See original GitHub issueHey There, first of all I’m really thankful for this library.
I’m using it since a long time now. Since the world seems to switch to esm i would do so too. But unfortunately since this moment this library does not work anymore.
I’m using it along with type-graphql so i really really need types without that i’m not able to upload files. Of course I’ve already added an issue over there to make sure i will find a solution.
Nevertheless…
While importing the files
Could not find a declaration file for module 'graphql-upload/Upload.mjs'. 'node_modules/graphql-upload/Upload.mjs' implicitly has an 'any' type.
This is my tsconfig.json
{
"compilerOptions": {
"allowJs": true,
"baseUrl": ".",
"declaration": true,
"declarationMap": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"lib": ["es2018", "esnext.asynciterable"],
"module": "esnext",
"moduleResolution": "nodenext",
"outDir": "build",
"removeComments": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "es2018"
},
"include": ["source"],
"exclude": ["build"]
}
Maybe I’m doing something wrong but i really don’t know what.
I read along alot of issues about this topic and it seems that a lot of people feel with me. For me this is a really hard situation because without types in such a central part of my application it feels like no good deal to me using this library. It’s not possible to me, to change my typescript configuration to commonjs to make a single library work.
I can really understand that maintaining a library as famous as this one is a real hard thing. And i’m really thankful that you’ve spend so much time creating this library.
While reading i did not really get the point of not using typescript here. Wouldnt it be much easier to do it in Typescript since there are so much people out there using it?
So i have at least two Questions.
Will there ever be proper types for this package ? If not is there a package which you might know solving my problems uploading Files with proper typings.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (2 by maintainers)
Yes i will keep you updated in case someone is using type-graphql as i do 😃 Thanks again for the support 🙏
You’re welcome 😃
I’m not the best person to ask; I don’t use or maintain
type-graphql
.Closing because there doesn’t appear to be anything to action here in this repo; if something comes up during the investigation in https://github.com/MichalLytek/type-graphql/issues/1372 that should be actioned here we can reopen.