Closed chidam02 closed 1 week ago
Typescript version : 4.7
This version is over two years old.
In the current version you will get the TS2823 error.
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"rootDir": "./src",
"outDir": "./dist",
"strict": true,
"jsx": "preserve",
"moduleResolution": "Node",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"useDefineForClassFields": true,
"sourceMap": true,
"resolveJsonModule": true,
"baseUrl": ".",
"types": [
"node",
"core-js",
"jest"
],
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
// "dom",
// "dom.iterable",
"scripthost"
]
},
"include": [
"src/**/**/*.ts",
"src/**/**/*.tsx",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
],
"ts-node": {
"esm": true,
}
}
I installed typescript v 5.6.3 its working now.
🔎 Search Terms
with assertion statement
🕗 Version & Regression Information
Typescript version : 4.7
💻 Code
🙁 Actual behavior
after compiling with
tsc filename.ts
output:
🙂 Expected behavior
expected:
Additional information about the issue
typescript compiler does not compiling import assertion statement written with 'with' statement but its working properly with 'assert' keyword which is deprecated in node latest version 22