-
Notifications
You must be signed in to change notification settings - Fork 173
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
deno-lint does not support tracking import =
syntax
#934
Comments
import =
syntax
We should actually provide diagnostics that flag |
acording to denoland/deno#12395 (comment)
@kitsonk consider remove the design limitation label? |
Lint Name
no-unused-vars
Code Snippet
Expected Result
No warning
Actual Result
Version
deno 1.14.3 (release, x86_64-unknown-linux-gnu)
v8 9.4.146.19
typescript 4.4.2
Why I
import Collection = mongo.Collection
and nottype Collection = mongo.Collection
(or in the case of denoland/deno#12395, why notconst Collection = mongo.Collection
)Read microsoft/TypeScript#2552 (comment)
TL;DR Consider the following
const Collection = mongo.Collection
does not work, because const only copymongo.Collection
's function constructortype Collection = mongo.Collection
also does not work, becauseGeneric type 'Collection<T>' requires 1 type argument(s)
=> import is the only solution
The text was updated successfully, but these errors were encountered: