@deno-types does not work on first load
See original GitHub issuepostcsstest.ts
import autoprefixer from "https://jspm.dev/autoprefixer";
// @deno-types="./postcss.d.ts"
import postcss from "https://jspm.dev/postcss";
postcss().use(autoprefixer).process(".something { appearance: none; }", {
from: undefined
}).then((f: any) => {
console.log(f.css);
})
postcss.d.ts
export default function(): any;
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. https://github.com/keroxp/servest/issues/133
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Towards Genotype-Specific Care for Chronic Hepatitis B: The ...
Blood for HBV viral load was obtained and, where able, genotype and full genome ... GESA: Resolved infection, HBsAg negative, hepatitis B viral...
Read more >Errors and warnings - PLINK 1.9 - cog-genomics.org
"No phenotypes present." Not a problem if you aren't performing any association analysis, or if you're explicitly loading phenotype data with --pheno when ......
Read more >Genetic Dominance: Genotype-Phenotype Relationships
Dominance affects the phenotype derived from an organism's genes, but it does not affect the way these genes are inherited. Complete dominance occurs...
Read more >Simultaneous Genotyping and Quantification of Hepatitis B ...
Viral load and HBV genotype play critical roles in determining clinical outcomes and response to antiviral treatment in hepatitis B patients. Viral genotype...
Read more >Problem to load genotype file in Tassel 5.2.3 - Google Groups
3, but I have the following error message: Error loading: C:\mdp_genotype.hmp.txt Taxon [] already exists in the list. Duplicated taxa not allowed. I...
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
Report current progress
Known 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-plugin
In fact,
typescript-deno-plugin
proxy the typescript method of finding modules.https://github.com/denoland/vscode_deno/blob/5b379fb995e402ef1fbd808d6f8385ebeca87d62/typescript-deno-plugin/src/plugin.ts#L430-L441
When the
import xxx from "xxx"
statement is detected, and there is// @deno-types="xxxx"
in the previous line of code, it will look for the module specified by deno-types.And return this path
https://github.com/denoland/vscode_deno/blob/5b379fb995e402ef1fbd808d6f8385ebeca87d62/typescript-deno-plugin/src/plugin.ts#L469-L487
https://github.com/denoland/vscode_deno/blob/5b379fb995e402ef1fbd808d6f8385ebeca87d62/typescript-deno-plugin/src/plugin.ts#L530-L542
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
really? Microsoft?