-
Notifications
You must be signed in to change notification settings - Fork 151
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-types does not work on first load #97
Comments
I kept thinking something was wrong with my declaration file setup, but I've been running into the same thing (with cheerio instead). As far as I can tell this might be related to @ry 's recent PR that downgraded the version of the typescript-deno-plugin package being used to before the 1.31.0 version where support for deno-types seems to have been introduced in this PR from @justjavac . But I haven't found any other discussion around this yet so that might not be an entirely accurate skeleton of a story. |
Same problem here: import jsdom from "https://jspm.dev/jsdom";
const dom = new jsdom.JSDOM("<h1>Hello World!</h1>", { url: "http://localhost "})
console.log(dom.window.document.querySelector("h1").textContent) The word JSDOM is underlined |
Might be related as well // @deno-types="https://denopkg.com/soremwar/deno_types/react/v16.13.1/react.d.ts"
export * from "https://cdn.skypack.dev/react"; Shows no types for either React or its named imports, even though JavaScript can see them just fine when I log them out |
Report current progressKnown issues On the first load, @deno-types failed to load correctly You only need to make any changes to trigger a refresh eg. https://github.com/denoland/vscode_deno/blob/master/examples/compile-hint/mod.ts I have been aware of this problem for a long time, but I’m not sure if it’s a bug in typescript or I’m using it incorrectly. How @deno-types works in typescript-deno-pluginIn fact, vscode_deno/typescript-deno-plugin/src/plugin.ts Lines 430 to 441 in 5b379fb
When the And return this path vscode_deno/typescript-deno-plugin/src/plugin.ts Lines 469 to 487 in 5b379fb
vscode_deno/typescript-deno-plugin/src/plugin.ts Lines 530 to 542 in 5b379fb
But it’s very strange that it didn’t take effect the first time it was run, and it only took effect the second. If someone is good at typescript, please don't be stingy with your help |
Wow thank you for that awesome workaround @axetroy + the investigation into this. It also seems to work for me if I open the cached d.ts file in VS Code and then save it without making any changes (and then the red squiggles go away and the intellisense from the typings comes in), but as soon as I close the cached d.ts file the squiggles/lack of intellisense comes back. Not sure if others are seeing that behavior as well (deno 1.1.0, typescript 3.9.2, Deno VS Code extension 2.0.16) |
Resolved in version 3.x of the extension. |
postcsstest.ts
postcss.d.ts
VSCode problem:
Notice that it runs correctly, and deno understands the
@deno-types
just fine, it's just this VSCode extension that doesn't understand these.Also I think this is the reason for errors elsewhere, e.g. keroxp/servest#133
The text was updated successfully, but these errors were encountered: