Closed JounQin closed 2 years ago
your string. replace
's type definition is at lib.es2015.symbol.wellknown.d.ts
, you can check whether your -p tsconfig.json
contains ES2015
.
@plantain-00
My tsconfig:
{
"extends": "@1stg/tsconfig/lib"
}
It is using "lib": ["ESNext"]
inside.
What I tried:
{
"extends": "@1stg/tsconfig/lib" // no error from type-coverage and vscode's typescript@4.3.5
}
{
"extends": "@1stg/tsconfig/lib",
"compilerOptions": {
"target": "es5" // errored from type-coverage and vscode's typescript@4.3.5
}
}
{
"extends": "@1stg/tsconfig/lib",
"compilerOptions": {
"target": "es5",
"downlevelIteration": true // no error from type-coverage and vscode's typescript@4.3.5
}
}
@plantain-00 Wired, can you please try https://github.com/JounQin/remark-preset-prettier/tree/fix/esm for reproduction? (Branch fix/esm
)
remove line https://github.com/JounQin/remark-preset-prettier/blob/fix/esm/scripts/build.ts#L45
yarn && yarn build && yarn typecov
I remove the // type-coverage:ignore-next-line -- https://github.com/plantain-00/type-coverage/issues/96
and get
$ yarn typecov
yarn run v1.22.4
$ type-coverage
158 / 158 100.00%
type-coverage success.
✨ Done in 4.76s.
Maybe your error comes from the cached result, try to delete .type-coverage
and do it again.
I've tried to delete .type-coverage
a lot of times.🤣
OK, I found that it results 100% on Node 14 while lower on Node 12.
That is very weird, after reinstall node 12 via nvm install 12
, there is no issue...
Close for now.
should be related to #101
Sorry, it still error https://github.com/JounQin/remark-preset-prettier/runs/5740767638?check_suite_focus=true
Maybe related to extends node_modules json with same name dir
like privatenumber/get-tsconfig@532bee9
(#21)
Version(if relevant): 2.18.0
Environment(if relevant):
Code(if relevant):
Expected:
No report
Actual:
See ts playground