mirror of
https://github.com/denoland/deno.git
synced 2024-12-21 23:04:45 -05:00
chore(cli): Ignore "experimentalDecorators" and "moduleDetection" options (#15202)
This commit is contained in:
parent
d17b3906bf
commit
6e350b2b7c
6 changed files with 8 additions and 29 deletions
|
@ -105,6 +105,7 @@ pub const IGNORED_COMPILER_OPTIONS: &[&str] = &[
|
|||
"emitBOM",
|
||||
"emitDeclarationOnly",
|
||||
"esModuleInterop",
|
||||
"experimentalDecorators",
|
||||
"extendedDiagnostics",
|
||||
"forceConsistentCasingInFileNames",
|
||||
"generateCpuProfile",
|
||||
|
@ -120,6 +121,7 @@ pub const IGNORED_COMPILER_OPTIONS: &[&str] = &[
|
|||
"mapRoot",
|
||||
"maxNodeModuleJsDepth",
|
||||
"module",
|
||||
"moduleDetection",
|
||||
"moduleResolution",
|
||||
"newLine",
|
||||
"noEmit",
|
||||
|
|
|
@ -659,7 +659,6 @@ itest!(async_error {
|
|||
|
||||
itest!(config {
|
||||
args: "run --reload --config config.tsconfig.json --check config.ts",
|
||||
exit_code: 1,
|
||||
output: "config.ts.out",
|
||||
});
|
||||
|
||||
|
@ -1042,7 +1041,7 @@ itest!(ts_type_imports {
|
|||
});
|
||||
|
||||
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",
|
||||
});
|
||||
|
||||
|
|
19
cli/tests/testdata/config.ts
vendored
19
cli/tests/testdata/config.ts
vendored
|
@ -1,18 +1,5 @@
|
|||
// deno-lint-ignore-file
|
||||
|
||||
function b() {
|
||||
return function (
|
||||
_target: any,
|
||||
_propertyKey: string,
|
||||
_descriptor: PropertyDescriptor,
|
||||
) {
|
||||
console.log("b");
|
||||
};
|
||||
function foo(bar) {
|
||||
return bar;
|
||||
}
|
||||
|
||||
class A {
|
||||
@b()
|
||||
a() {
|
||||
console.log("a");
|
||||
}
|
||||
}
|
||||
foo(1);
|
||||
|
|
6
cli/tests/testdata/config.ts.out
vendored
6
cli/tests/testdata/config.ts.out
vendored
|
@ -1,8 +1,4 @@
|
|||
[WILDCARD]Unsupported compiler options in "[WILDCARD]config.tsconfig.json".
|
||||
The following options were ignored:
|
||||
module, target
|
||||
[WILDCARD]
|
||||
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]
|
||||
Check [WILDCARD]/config.ts
|
||||
|
|
2
cli/tests/testdata/config.tsconfig.json
vendored
2
cli/tests/testdata/config.tsconfig.json
vendored
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"experimentalDecorators": false,
|
||||
"module": "amd",
|
||||
"strict": false,
|
||||
"target": "es5"
|
||||
}
|
||||
}
|
||||
|
|
5
cli/tests/testdata/tsconfig.decorators.json
vendored
5
cli/tests/testdata/tsconfig.decorators.json
vendored
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"experimentalDecorators": true
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue