You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version: Deno 1.46.3
Using latest version of VScode with latest version of Deno official extension for vscode
The bug:
When using a import that starts with 'type' word, then when you hover in vscode on that type "FC" it shows nothing, which means it could not resolve from where it should be imported or something like that, when ctrl+click on 'react' it also doesn't open the react types file.
// @deno-types="@types/react"
import type { FC } from 'react'
The Fix:
Move type inside {}, after that everything works as expected, on hover it shows the type definition, and clicking on 'react' word it opens in the editor the react type defs
// @deno-types="@types/react"
import { type FC } from 'react'
But with this tow work I have to exclude linter rule 'verbatim-module-syntax' from linter so that it doesn't complain
Expectation:
Well I expect that both import syntaxes works the same as it does in node, and I get the type definition when howering, and the autocomplition same as in the second scenario but without turning off linter rule verbatim-module-syntax
The text was updated successfully, but these errors were encountered:
nayeemrmn
added
types
Issues related to TypeScript types
tsc
related to the TypeScript tsc compiler
and removed
types
Issues related to TypeScript types
labels
Sep 16, 2024
I suppose you may as well write import type { FC } from '@types/react' which is kind of why it behaves this way, but it makes more sense to prioritise @deno-types. We'll fix it.
Version: Deno 1.46.3
Using latest version of VScode with latest version of Deno official extension for vscode
The bug:
When using a import that starts with 'type' word, then when you hover in vscode on that type "FC" it shows nothing, which means it could not resolve from where it should be imported or something like that, when ctrl+click on 'react' it also doesn't open the react types file.
The Fix:
Move type inside {}, after that everything works as expected, on hover it shows the type definition, and clicking on 'react' word it opens in the editor the react type defs
But with this tow work I have to exclude linter rule 'verbatim-module-syntax' from linter so that it doesn't complain
Expectation:
Well I expect that both import syntaxes works the same as it does in node, and I get the type definition when howering, and the autocomplition same as in the second scenario but without turning off linter rule verbatim-module-syntax
The text was updated successfully, but these errors were encountered: