Skip to content

Commit 631affd

Browse files
Deprecate --outFile (#62981)
1 parent 7bb5ba3 commit 631affd

File tree

534 files changed

+12302
-3255
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

534 files changed

+12302
-3255
lines changed

src/compiler/program.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4484,7 +4484,7 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro
44844484
createDeprecatedDiagnostic("charset");
44854485
}
44864486
if (options.out) {
4487-
createDeprecatedDiagnostic("out", /*value*/ undefined, "outFile");
4487+
createDeprecatedDiagnostic("out");
44884488
}
44894489
if (options.importsNotUsedAsValues) {
44904490
createDeprecatedDiagnostic("importsNotUsedAsValues", /*value*/ undefined, "verbatimModuleSyntax");
@@ -4510,6 +4510,9 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro
45104510
if (options.allowSyntheticDefaultImports === false) {
45114511
createDeprecatedDiagnostic("allowSyntheticDefaultImports", "false", /*useInstead*/ undefined, /*related*/ undefined);
45124512
}
4513+
if (options.outFile) {
4514+
createDeprecatedDiagnostic("outFile");
4515+
}
45134516
if (options.module === ModuleKind.None || options.module === ModuleKind.AMD || options.module === ModuleKind.UMD || options.module === ModuleKind.System) {
45144517
createDeprecatedDiagnostic("module", ModuleKind[options.module], /*useInstead*/ undefined, /*related*/ undefined);
45154518
}

tests/baselines/reference/alwaysStrictModule2.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
12
a.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode.
23
b.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode.
34

45

6+
!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
57
==== a.ts (1 errors) ====
68
namespace M {
79
export function f() {

tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
12
error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
23

34

5+
!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
46
!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
57
==== Class.ts (0 errors) ====
68
import { Configurable } from "./Configurable"

tests/baselines/reference/amdModuleBundleNoDuplicateDeclarationEmitComments.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
12
error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
23

34

5+
!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
46
!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
57
==== file1.ts (0 errors) ====
68
/// <amd-module name="mynamespace::SomeModuleA" />
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
2+
3+
4+
!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
5+
==== c.ts (0 errors) ====
6+
let foo: typeof C;
7+
==== b.ts (0 errors) ====
8+
class C { }
9+

tests/baselines/reference/blockScopedNamespaceDifferentFile.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
12
error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
23

34

5+
!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
46
!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
57
==== test.ts (0 errors) ====
68
namespace C {
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
2+
3+
4+
!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
5+
==== index.ts (0 errors) ====
6+
export * from "./nested";
7+
8+
==== nested/base.ts (0 errors) ====
9+
import { B } from "./shared";
10+
11+
export function f() {
12+
return new B();
13+
}
14+
15+
==== nested/derived.ts (0 errors) ====
16+
import { f } from "./base";
17+
18+
export function g() {
19+
return f();
20+
}
21+
22+
==== nested/index.ts (0 errors) ====
23+
export * from "./base";
24+
25+
export * from "./derived";
26+
export * from "./shared";
27+
28+
==== nested/shared.ts (0 errors) ====
29+
export class B {}
30+

tests/baselines/reference/bundledDtsLateExportRenaming.js

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -49,34 +49,3 @@ declare module "nested/index" {
4949
declare module "index" {
5050
export * from "nested/index";
5151
}
52-
53-
54-
//// [DtsFileErrors]
55-
56-
57-
dist/out.d.ts(10,33): error TS2307: Cannot find module 'nested' or its corresponding type declarations.
58-
59-
60-
==== dist/out.d.ts (1 errors) ====
61-
declare module "nested/shared" {
62-
export class B {
63-
}
64-
}
65-
declare module "nested/base" {
66-
import { B } from "nested/shared";
67-
export function f(): B;
68-
}
69-
declare module "nested/derived" {
70-
export function g(): import("nested").B;
71-
~~~~~~~~
72-
!!! error TS2307: Cannot find module 'nested' or its corresponding type declarations.
73-
}
74-
declare module "nested/index" {
75-
export * from "nested/base";
76-
export * from "nested/derived";
77-
export * from "nested/shared";
78-
}
79-
declare module "index" {
80-
export * from "nested/index";
81-
}
82-

tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
12
weird.js(1,1): error TS2552: Cannot find name 'someFunction'. Did you mean 'Function'?
23
weird.js(1,23): error TS7006: Parameter 'BaseClass' implicitly has an 'any' type.
34
weird.js(9,17): error TS7006: Parameter 'error' implicitly has an 'any' type.
45

56

7+
!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
68
==== weird.js (3 errors) ====
79
someFunction(function(BaseClass) {
810
~~~~~~~~~~~~

tests/baselines/reference/checkJsdocOnEndOfFile.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
12
eof.js(2,20): error TS2304: Cannot find name 'bad'.
23

34

5+
!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
46
==== eof.js (1 errors) ====
57
/**
68
* @typedef {Array<bad>} Should have error here

0 commit comments

Comments
 (0)