Invalid typescript file
See original GitHub issueCurrently I’m using "graphql-binding": "^2.1.1"
to generate my own bindings.
The file that is being generated contains:
export interface BindingConstructor<T> {
new(...args): T
}
and the compiler complains:
[ts] Rest parameter 'args' implicitly has an 'any[]' type.
I am kind of confused by how these should be typed otherwise I’d have submitted a PR.
Or is it the case of explicitly typing it as any[]
?
Thanks! 👍
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:5
Top Results From Across the Web
Invalid Typescript File · Issue #25 · allenhwkim/ngentest - GitHub
when i run ngentest app.component.ts, i get: Error. invalid typescript file. e.g., Usage $0 [options] my ngentest.config.js file: const fs ...
Read more >Getting invalid typescript errors in valid TS code - Stack Overflow
I am having a create-react-app (v17.0.2) with typescript (v4.5.5). I am getting typescript errors even in valid TS code.
Read more >ae-wrong-input-file-type - API Extractor
Unlike some other tools, API Extractor does not process TypeScript source files directly. Instead, it is designed to analyze the .d.ts files that...
Read more >TypeScript errors and how to fix them
export function logSomething(error: unknown): void;. Alternatively, you can write your function implementation inside a source code file ( *.ts ). TS1192.
Read more >Documentation - Do's and Don'ts - TypeScript
Recommendations for writing d.ts files. ... WRONG */. function reverse(s: String): String;. ✓ Do use the types number , string , boolean ,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
On the github docs sample there is the same error: https://github.com/graphql-binding/graphql-binding-github/blob/master/src/generated-binding.ts#L80
Typescript has been adding changes related to rest-spread later, so it may be the case that just now the compiler started complaining.
Fixed 👍