1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

chore(cli): Ignore "experimentalDecorators" and "moduleDetection" options (#15202)

This commit is contained in:
Nayeem Rahman 2022-07-20 15:59:56 +01:00 committed by GitHub
parent d17b3906bf
commit 6e350b2b7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 29 deletions

View file

@ -105,6 +105,7 @@ pub const IGNORED_COMPILER_OPTIONS: &[&str] = &[
"emitBOM", "emitBOM",
"emitDeclarationOnly", "emitDeclarationOnly",
"esModuleInterop", "esModuleInterop",
"experimentalDecorators",
"extendedDiagnostics", "extendedDiagnostics",
"forceConsistentCasingInFileNames", "forceConsistentCasingInFileNames",
"generateCpuProfile", "generateCpuProfile",
@ -120,6 +121,7 @@ pub const IGNORED_COMPILER_OPTIONS: &[&str] = &[
"mapRoot", "mapRoot",
"maxNodeModuleJsDepth", "maxNodeModuleJsDepth",
"module", "module",
"moduleDetection",
"moduleResolution", "moduleResolution",
"newLine", "newLine",
"noEmit", "noEmit",

View file

@ -659,7 +659,6 @@ itest!(async_error {
itest!(config { itest!(config {
args: "run --reload --config config.tsconfig.json --check config.ts", args: "run --reload --config config.tsconfig.json --check config.ts",
exit_code: 1,
output: "config.ts.out", output: "config.ts.out",
}); });
@ -1042,7 +1041,7 @@ itest!(ts_type_imports {
}); });
itest!(ts_decorators { itest!(ts_decorators {
args: "run --reload -c tsconfig.decorators.json --check ts_decorators.ts", args: "run --reload --check ts_decorators.ts",
output: "ts_decorators.ts.out", output: "ts_decorators.ts.out",
}); });

View file

@ -1,18 +1,5 @@
// deno-lint-ignore-file function foo(bar) {
return bar;
function b() {
return function (
_target: any,
_propertyKey: string,
_descriptor: PropertyDescriptor,
) {
console.log("b");
};
} }
class A { foo(1);
@b()
a() {
console.log("a");
}
}

View file

@ -1,8 +1,4 @@
[WILDCARD]Unsupported compiler options in "[WILDCARD]config.tsconfig.json". [WILDCARD]Unsupported compiler options in "[WILDCARD]config.tsconfig.json".
The following options were ignored: The following options were ignored:
module, target module, target
[WILDCARD] Check [WILDCARD]/config.ts
error: TS1219 [ERROR]: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
a() {
^
at file:///[WILDCARD]/config.ts:[WILDCARD]

View file

@ -1,7 +1,7 @@
{ {
"compilerOptions": { "compilerOptions": {
"experimentalDecorators": false,
"module": "amd", "module": "amd",
"strict": false,
"target": "es5" "target": "es5"
} }
} }

View file

@ -1,5 +0,0 @@
{
"compilerOptions": {
"experimentalDecorators": true
}
}