Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Deno fails compiling with generic inference #3997

Closed
brandonkal opened this issue Feb 14, 2020 · 8 comments
Closed

[bug] Deno fails compiling with generic inference #3997

brandonkal opened this issue Feb 14, 2020 · 8 comments

Comments

@brandonkal
Copy link
Contributor

See https://gist.github.com/brandonkal/853c3d1dc53a79d366b6662eaa84bb5f

Details of the bug are contained in the Gist file.

Pinging @kitsonk as he is the TypeScript expert here.

To reproduce, run the file and notice that Deno throws bad TypeScript errors. tsc correctly infers the type of the parameters.

@kitsonk
Copy link
Contributor

kitsonk commented Feb 14, 2020

Top Level Await is not supported in TypeScript 3.7. We are temporarily getting past this by ignoring the error, but internally TypeScript is not tracking the types right, because it thinks you have invalid syntax.

What version of tsc are you using?

@brandonkal
Copy link
Contributor Author

3.7.2

@brandonkal
Copy link
Contributor Author

Interesting though this doesn't appear to be related to the await thing. Wrapping the whole thing in an async function, Deno still spits out the same TS compile errors.

@kitsonk
Copy link
Contributor

kitsonk commented Feb 15, 2020

@brandonkal what does your tsc config look like?

@brandonkal
Copy link
Contributor Author

https://github.com/brandonkal/deno-lib/blob/master/tsconfig.json

Maybe I've got something odd going on in my environment. I'm seeing the effect of "strictNullChecks" but now looking at my tsconfig, it is not specified there.

I have axetroy.vscode-deno installed.

@kitsonk
Copy link
Contributor

kitsonk commented Feb 15, 2020

@brandonkal you can't run tsc based on the tsconfig.json and have your example compile. Could you please provide an example where tsc successfully compiles?

@bartlomieju
Copy link
Member

@kitsonk PTAL if this issue is still relevant

@kitsonk
Copy link
Contributor

kitsonk commented Nov 8, 2020

This was always an external issue, and there was outstanding information requested that was outstanding. Closing due to inaction.

@kitsonk kitsonk closed this as completed Nov 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants