Skip to content

Commit d9d6c4b

Browse files
committed
Accept baselines
1 parent 0745652 commit d9d6c4b

File tree

11,862 files changed

+556621
-0
lines changed

Some content is hidden

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

11,862 files changed

+556621
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
index.ts(1,21): error TS2307: Cannot find module 'typescript' or its corresponding type declarations.
2+
index.ts(2,29): error TS2307: Cannot find module 'typescript-internal' or its corresponding type declarations.
3+
index.ts(3,34): error TS2307: Cannot find module 'tsserverlibrary' or its corresponding type declarations.
4+
index.ts(4,42): error TS2307: Cannot find module 'tsserverlibrary-internal' or its corresponding type declarations.
5+
6+
7+
==== index.ts (4 errors) ====
8+
import ts = require("typescript");
9+
~~~~~~~~~~~~
10+
!!! error TS2307: Cannot find module 'typescript' or its corresponding type declarations.
11+
import tsInternal = require("typescript-internal");
12+
~~~~~~~~~~~~~~~~~~~~~
13+
!!! error TS2307: Cannot find module 'typescript-internal' or its corresponding type declarations.
14+
import tsserverlibrary = require("tsserverlibrary");
15+
~~~~~~~~~~~~~~~~~
16+
!!! error TS2307: Cannot find module 'tsserverlibrary' or its corresponding type declarations.
17+
import tsserverlibraryInternal = require("tsserverlibrary-internal");
18+
~~~~~~~~~~~~~~~~~~~~~~~~~~
19+
!!! error TS2307: Cannot find module 'tsserverlibrary-internal' or its corresponding type declarations.
20+
21+
==== node_modules/typescript/package.json (0 errors) ====
22+
{
23+
"name": "typescript",
24+
"types": "/.ts/typescript.d.ts"
25+
}
26+
27+
==== node_modules/typescript-internal/package.json (0 errors) ====
28+
{
29+
"name": "typescript-internal",
30+
"types": "/.ts/typescript.internal.d.ts"
31+
}
32+
33+
==== node_modules/tsserverlibrary/package.json (0 errors) ====
34+
{
35+
"name": "tsserverlibrary",
36+
"types": "/.ts/tsserverlibrary.d.ts"
37+
}
38+
39+
==== node_modules/tsserverlibrary-internal/package.json (0 errors) ====
40+
{
41+
"name": "tsserverlibrary-internal",
42+
"types": "/.ts/tsserverlibrary.internal.d.ts"
43+
}
44+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
--- old.APILibCheck.errors.txt
2+
+++ new.APILibCheck.errors.txt
3+
@@= skipped -0, +-1 lines =@@
4+
-<no content>
5+
@@= skipped --1, +1 lines =@@
6+
+index.ts(1,21): error TS2307: Cannot find module 'typescript' or its corresponding type declarations.
7+
+index.ts(2,29): error TS2307: Cannot find module 'typescript-internal' or its corresponding type declarations.
8+
+index.ts(3,34): error TS2307: Cannot find module 'tsserverlibrary' or its corresponding type declarations.
9+
+index.ts(4,42): error TS2307: Cannot find module 'tsserverlibrary-internal' or its corresponding type declarations.
10+
+
11+
+
12+
+==== index.ts (4 errors) ====
13+
+ import ts = require("typescript");
14+
+ ~~~~~~~~~~~~
15+
+!!! error TS2307: Cannot find module 'typescript' or its corresponding type declarations.
16+
+ import tsInternal = require("typescript-internal");
17+
+ ~~~~~~~~~~~~~~~~~~~~~
18+
+!!! error TS2307: Cannot find module 'typescript-internal' or its corresponding type declarations.
19+
+ import tsserverlibrary = require("tsserverlibrary");
20+
+ ~~~~~~~~~~~~~~~~~
21+
+!!! error TS2307: Cannot find module 'tsserverlibrary' or its corresponding type declarations.
22+
+ import tsserverlibraryInternal = require("tsserverlibrary-internal");
23+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
24+
+!!! error TS2307: Cannot find module 'tsserverlibrary-internal' or its corresponding type declarations.
25+
+
26+
+==== node_modules/typescript/package.json (0 errors) ====
27+
+ {
28+
+ "name": "typescript",
29+
+ "types": "/.ts/typescript.d.ts"
30+
+ }
31+
+
32+
+==== node_modules/typescript-internal/package.json (0 errors) ====
33+
+ {
34+
+ "name": "typescript-internal",
35+
+ "types": "/.ts/typescript.internal.d.ts"
36+
+ }
37+
+
38+
+==== node_modules/tsserverlibrary/package.json (0 errors) ====
39+
+ {
40+
+ "name": "tsserverlibrary",
41+
+ "types": "/.ts/tsserverlibrary.d.ts"
42+
+ }
43+
+
44+
+==== node_modules/tsserverlibrary-internal/package.json (0 errors) ====
45+
+ {
46+
+ "name": "tsserverlibrary-internal",
47+
+ "types": "/.ts/tsserverlibrary.internal.d.ts"
48+
+ }
49+
+
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
APISample_Watch.ts(11,21): error TS2307: Cannot find module 'typescript' or its corresponding type declarations.
2+
APISample_Watch.ts(14,27): error TS7006: Parameter 'path' implicitly has an 'any' type.
3+
APISample_Watch.ts(45,61): error TS7006: Parameter 'options' implicitly has an 'any' type.
4+
APISample_Watch.ts(45,70): error TS7006: Parameter 'host' implicitly has an 'any' type.
5+
APISample_Watch.ts(45,76): error TS7006: Parameter 'oldProgram' implicitly has an 'any' type.
6+
APISample_Watch.ts(51,31): error TS7006: Parameter 'program' implicitly has an 'any' type.
7+
8+
9+
==== APISample_Watch.ts (6 errors) ====
10+
/*
11+
* Note: This test is a public API sample. The sample sources can be found
12+
* at: https://github.com/Microsoft/TypeScript-wiki/blob/master/Using-the-Compiler-API.md#writing-an-incremental-program-watcher
13+
* Please log a "breaking change" issue for any API breaking change affecting this issue
14+
*/
15+
16+
declare var process: any;
17+
declare var console: any;
18+
declare var os: any;
19+
20+
import ts = require("typescript");
21+
~~~~~~~~~~~~
22+
!!! error TS2307: Cannot find module 'typescript' or its corresponding type declarations.
23+
24+
const formatHost: ts.FormatDiagnosticsHost = {
25+
getCanonicalFileName: path => path,
26+
~~~~
27+
!!! error TS7006: Parameter 'path' implicitly has an 'any' type.
28+
getCurrentDirectory: ts.sys.getCurrentDirectory,
29+
getNewLine: () => ts.sys.newLine,
30+
}
31+
32+
function watchMain() {
33+
const configPath = ts.findConfigFile(/*searchPath*/ "./", ts.sys.fileExists, "tsconfig.json");
34+
if (!configPath) {
35+
throw new Error("Could not find a valid 'tsconfig.json'.");
36+
}
37+
38+
// TypeScript can use several different program creation "strategies":
39+
// * ts.createEmitAndSemanticDiagnosticsBuilderProgram,
40+
// * ts.createSemanticDiagnosticsBuilderProgram
41+
// * ts.createAbstractBuilder
42+
// The first two produce "builder programs". These use an incremental strategy to only re-check and emit files whose
43+
// contents may have changed, or whose dependencies may have changes which may impact change the result of prior type-check and emit.
44+
// The last uses an ordinary program which does a full type check after every change.
45+
// Between `createEmitAndSemanticDiagnosticsBuilderProgram` and `createSemanticDiagnosticsBuilderProgram`, the only difference is emit.
46+
// For pure type-checking scenarios, or when another tool/process handles emit, using `createSemanticDiagnosticsBuilderProgram` may be more desirable.
47+
48+
// Note that there is another overload for `createWatchCompilerHost` that takes a set of root files.
49+
const host = ts.createWatchCompilerHost(configPath, {}, ts.sys,
50+
ts.createSemanticDiagnosticsBuilderProgram,
51+
reportDiagnostic,
52+
reportWatchStatusChanged,
53+
);
54+
55+
// You can technically override any given hook on the host, though you probably don't need to.
56+
// Note that we're assuming `origCreateProgram` and `origPostProgramCreate` doesn't use `this` at all.
57+
const origCreateProgram = host.createProgram;
58+
host.createProgram = (rootNames: ReadonlyArray<string>, options, host, oldProgram) => {
59+
~~~~~~~
60+
!!! error TS7006: Parameter 'options' implicitly has an 'any' type.
61+
~~~~
62+
!!! error TS7006: Parameter 'host' implicitly has an 'any' type.
63+
~~~~~~~~~~
64+
!!! error TS7006: Parameter 'oldProgram' implicitly has an 'any' type.
65+
console.log("** We're about to create the program! **");
66+
return origCreateProgram(rootNames, options, host, oldProgram);
67+
}
68+
const origPostProgramCreate = host.afterProgramCreate;
69+
70+
host.afterProgramCreate = program => {
71+
~~~~~~~
72+
!!! error TS7006: Parameter 'program' implicitly has an 'any' type.
73+
console.log("** We finished making the program! **");
74+
origPostProgramCreate!(program);
75+
};
76+
77+
// `createWatchProgram` creates an initial program, watches files, and updates the program over time.
78+
ts.createWatchProgram(host);
79+
}
80+
81+
function reportDiagnostic(diagnostic: ts.Diagnostic) {
82+
console.error("Error", diagnostic.code, ":",
83+
ts.flattenDiagnosticMessageText(diagnostic.messageText, formatHost.getNewLine())
84+
);
85+
}
86+
87+
/**
88+
* Prints a diagnostic every time the watch status changes.
89+
* This is mainly for messages like "Starting compilation" or "Compilation completed".
90+
*/
91+
function reportWatchStatusChanged(diagnostic: ts.Diagnostic) {
92+
console.info(ts.formatDiagnostic(diagnostic, formatHost));
93+
}
94+
95+
watchMain();
96+
97+
==== node_modules/typescript/package.json (0 errors) ====
98+
{
99+
"name": "typescript",
100+
"types": "/.ts/typescript.d.ts"
101+
}
102+
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
--- old.APISample_Watch.errors.txt
2+
+++ new.APISample_Watch.errors.txt
3+
@@= skipped -0, +-1 lines =@@
4+
-<no content>
5+
@@= skipped --1, +1 lines =@@
6+
+APISample_Watch.ts(11,21): error TS2307: Cannot find module 'typescript' or its corresponding type declarations.
7+
+APISample_Watch.ts(14,27): error TS7006: Parameter 'path' implicitly has an 'any' type.
8+
+APISample_Watch.ts(45,61): error TS7006: Parameter 'options' implicitly has an 'any' type.
9+
+APISample_Watch.ts(45,70): error TS7006: Parameter 'host' implicitly has an 'any' type.
10+
+APISample_Watch.ts(45,76): error TS7006: Parameter 'oldProgram' implicitly has an 'any' type.
11+
+APISample_Watch.ts(51,31): error TS7006: Parameter 'program' implicitly has an 'any' type.
12+
+
13+
+
14+
+==== APISample_Watch.ts (6 errors) ====
15+
+ /*
16+
+ * Note: This test is a public API sample. The sample sources can be found
17+
+ * at: https://github.com/Microsoft/TypeScript-wiki/blob/master/Using-the-Compiler-API.md#writing-an-incremental-program-watcher
18+
+ * Please log a "breaking change" issue for any API breaking change affecting this issue
19+
+ */
20+
+
21+
+ declare var process: any;
22+
+ declare var console: any;
23+
+ declare var os: any;
24+
+
25+
+ import ts = require("typescript");
26+
+ ~~~~~~~~~~~~
27+
+!!! error TS2307: Cannot find module 'typescript' or its corresponding type declarations.
28+
+
29+
+ const formatHost: ts.FormatDiagnosticsHost = {
30+
+ getCanonicalFileName: path => path,
31+
+ ~~~~
32+
+!!! error TS7006: Parameter 'path' implicitly has an 'any' type.
33+
+ getCurrentDirectory: ts.sys.getCurrentDirectory,
34+
+ getNewLine: () => ts.sys.newLine,
35+
+ }
36+
+
37+
+ function watchMain() {
38+
+ const configPath = ts.findConfigFile(/*searchPath*/ "./", ts.sys.fileExists, "tsconfig.json");
39+
+ if (!configPath) {
40+
+ throw new Error("Could not find a valid 'tsconfig.json'.");
41+
+ }
42+
+
43+
+ // TypeScript can use several different program creation "strategies":
44+
+ // * ts.createEmitAndSemanticDiagnosticsBuilderProgram,
45+
+ // * ts.createSemanticDiagnosticsBuilderProgram
46+
+ // * ts.createAbstractBuilder
47+
+ // The first two produce "builder programs". These use an incremental strategy to only re-check and emit files whose
48+
+ // contents may have changed, or whose dependencies may have changes which may impact change the result of prior type-check and emit.
49+
+ // The last uses an ordinary program which does a full type check after every change.
50+
+ // Between `createEmitAndSemanticDiagnosticsBuilderProgram` and `createSemanticDiagnosticsBuilderProgram`, the only difference is emit.
51+
+ // For pure type-checking scenarios, or when another tool/process handles emit, using `createSemanticDiagnosticsBuilderProgram` may be more desirable.
52+
+
53+
+ // Note that there is another overload for `createWatchCompilerHost` that takes a set of root files.
54+
+ const host = ts.createWatchCompilerHost(configPath, {}, ts.sys,
55+
+ ts.createSemanticDiagnosticsBuilderProgram,
56+
+ reportDiagnostic,
57+
+ reportWatchStatusChanged,
58+
+ );
59+
+
60+
+ // You can technically override any given hook on the host, though you probably don't need to.
61+
+ // Note that we're assuming `origCreateProgram` and `origPostProgramCreate` doesn't use `this` at all.
62+
+ const origCreateProgram = host.createProgram;
63+
+ host.createProgram = (rootNames: ReadonlyArray<string>, options, host, oldProgram) => {
64+
+ ~~~~~~~
65+
+!!! error TS7006: Parameter 'options' implicitly has an 'any' type.
66+
+ ~~~~
67+
+!!! error TS7006: Parameter 'host' implicitly has an 'any' type.
68+
+ ~~~~~~~~~~
69+
+!!! error TS7006: Parameter 'oldProgram' implicitly has an 'any' type.
70+
+ console.log("** We're about to create the program! **");
71+
+ return origCreateProgram(rootNames, options, host, oldProgram);
72+
+ }
73+
+ const origPostProgramCreate = host.afterProgramCreate;
74+
+
75+
+ host.afterProgramCreate = program => {
76+
+ ~~~~~~~
77+
+!!! error TS7006: Parameter 'program' implicitly has an 'any' type.
78+
+ console.log("** We finished making the program! **");
79+
+ origPostProgramCreate!(program);
80+
+ };
81+
+
82+
+ // `createWatchProgram` creates an initial program, watches files, and updates the program over time.
83+
+ ts.createWatchProgram(host);
84+
+ }
85+
+
86+
+ function reportDiagnostic(diagnostic: ts.Diagnostic) {
87+
+ console.error("Error", diagnostic.code, ":",
88+
+ ts.flattenDiagnosticMessageText(diagnostic.messageText, formatHost.getNewLine())
89+
+ );
90+
+ }
91+
+
92+
+ /**
93+
+ * Prints a diagnostic every time the watch status changes.
94+
+ * This is mainly for messages like "Starting compilation" or "Compilation completed".
95+
+ */
96+
+ function reportWatchStatusChanged(diagnostic: ts.Diagnostic) {
97+
+ console.info(ts.formatDiagnostic(diagnostic, formatHost));
98+
+ }
99+
+
100+
+ watchMain();
101+
+
102+
+==== node_modules/typescript/package.json (0 errors) ====
103+
+ {
104+
+ "name": "typescript",
105+
+ "types": "/.ts/typescript.d.ts"
106+
+ }
107+
+
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
APISample_WatchWithDefaults.ts(8,21): error TS2307: Cannot find module 'typescript' or its corresponding type declarations.
2+
APISample_WatchWithDefaults.ts(32,27): error TS7006: Parameter 'rootNames' implicitly has an 'any' type.
3+
APISample_WatchWithDefaults.ts(32,38): error TS7006: Parameter 'options' implicitly has an 'any' type.
4+
APISample_WatchWithDefaults.ts(32,47): error TS7006: Parameter 'host' implicitly has an 'any' type.
5+
APISample_WatchWithDefaults.ts(32,53): error TS7006: Parameter 'oldProgram' implicitly has an 'any' type.
6+
APISample_WatchWithDefaults.ts(38,31): error TS7006: Parameter 'program' implicitly has an 'any' type.
7+
8+
9+
==== APISample_WatchWithDefaults.ts (6 errors) ====
10+
/*
11+
* Note: This test is a public API sample. This uses default sys interface without having to pass anything
12+
* Please log a "breaking change" issue for any API breaking change affecting this issue
13+
*/
14+
15+
declare var console: any;
16+
17+
import ts = require("typescript");
18+
~~~~~~~~~~~~
19+
!!! error TS2307: Cannot find module 'typescript' or its corresponding type declarations.
20+
21+
function watchMain() {
22+
const configPath = ts.findConfigFile(/*searchPath*/ "./", ts.sys.fileExists, "tsconfig.json");
23+
if (!configPath) {
24+
throw new Error("Could not find a valid 'tsconfig.json'.");
25+
}
26+
27+
// TypeScript can use several different program creation "strategies":
28+
// * ts.createEmitAndSemanticDiagnosticsBuilderProgram,
29+
// * ts.createSemanticDiagnosticsBuilderProgram
30+
// * ts.createAbstractBuilder
31+
// The first two produce "builder programs". These use an incremental strategy to only re-check and emit files whose
32+
// contents may have changed, or whose dependencies may have changes which may impact change the result of prior type-check and emit.
33+
// The last uses an ordinary program which does a full type check after every change.
34+
// Between `createEmitAndSemanticDiagnosticsBuilderProgram` and `createSemanticDiagnosticsBuilderProgram`, the only difference is emit.
35+
// For pure type-checking scenarios, or when another tool/process handles emit, using `createSemanticDiagnosticsBuilderProgram` may be more desirable.
36+
37+
// Note that there is another overload for `createWatchCompilerHost` that takes a set of root files.
38+
const host = ts.createWatchCompilerHost(configPath, {}, ts.sys);
39+
40+
// You can technically override any given hook on the host, though you probably don't need to.
41+
// Note that we're assuming `origCreateProgram` and `origPostProgramCreate` doesn't use `this` at all.
42+
const origCreateProgram = host.createProgram;
43+
host.createProgram = (rootNames, options, host, oldProgram) => {
44+
~~~~~~~~~
45+
!!! error TS7006: Parameter 'rootNames' implicitly has an 'any' type.
46+
~~~~~~~
47+
!!! error TS7006: Parameter 'options' implicitly has an 'any' type.
48+
~~~~
49+
!!! error TS7006: Parameter 'host' implicitly has an 'any' type.
50+
~~~~~~~~~~
51+
!!! error TS7006: Parameter 'oldProgram' implicitly has an 'any' type.
52+
console.log("** We're about to create the program! **");
53+
return origCreateProgram(rootNames, options, host, oldProgram);
54+
}
55+
const origPostProgramCreate = host.afterProgramCreate;
56+
57+
host.afterProgramCreate = program => {
58+
~~~~~~~
59+
!!! error TS7006: Parameter 'program' implicitly has an 'any' type.
60+
console.log("** We finished making the program! **");
61+
origPostProgramCreate!(program);
62+
};
63+
64+
// `createWatchProgram` creates an initial program, watches files, and updates the program over time.
65+
ts.createWatchProgram(host);
66+
}
67+
68+
watchMain();
69+
70+
==== node_modules/typescript/package.json (0 errors) ====
71+
{
72+
"name": "typescript",
73+
"types": "/.ts/typescript.d.ts"
74+
}
75+

0 commit comments

Comments
 (0)