Update baselines.

This commit is contained in:
Daniel
2020-04-06 20:09:48 +00:00
parent e4a6208f05
commit f2c0bbb1a7
6738 changed files with 99251 additions and 83981 deletions
@@ -1158,4 +1158,42 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
+1 -2
View File
@@ -28,8 +28,7 @@ var Ship = /** @class */ (function () {
}());
var Board = /** @class */ (function () {
function Board() {
}
Board.prototype.allShipsSunk = function () {
}Board.prototype.allShipsSunk = function () {
return this.ships.every(function (val) { return val.isSunk; });
};
return Board;
+17 -3
View File
@@ -90,12 +90,17 @@ watchMain();
* Please log a "breaking change" issue for any API breaking change affecting this issue
*/
exports.__esModule = true;
var ts = require("typescript");
var formatHost = {
getCanonicalFileName: function (path) { return path; },
getCurrentDirectory: ts.sys.getCurrentDirectory,
getNewLine: function () { return ts.sys.newLine; }
};
}
;
function watchMain() {
var configPath = ts.findConfigFile(/*searchPath*/ "./", ts.sys.fileExists, "tsconfig.json");
if (!configPath) {
@@ -111,7 +116,11 @@ function watchMain() {
// Between `createEmitAndSemanticDiagnosticsBuilderProgram` and `createSemanticDiagnosticsBuilderProgram`, the only difference is emit.
// For pure type-checking scenarios, or when another tool/process handles emit, using `createSemanticDiagnosticsBuilderProgram` may be more desirable.
// Note that there is another overload for `createWatchCompilerHost` that takes a set of root files.
var host = ts.createWatchCompilerHost(configPath, {}, ts.sys, ts.createSemanticDiagnosticsBuilderProgram, reportDiagnostic, reportWatchStatusChanged);
var host = ts.createWatchCompilerHost(configPath, {}, ts.sys,
ts.createSemanticDiagnosticsBuilderProgram,
reportDiagnostic,
reportWatchStatusChanged);
// You can technically override any given hook on the host, though you probably don't need to.
// Note that we're assuming `origCreateProgram` and `origPostProgramCreate` doesn't use `this` at all.
var origCreateProgram = host.createProgram;
@@ -120,6 +129,7 @@ function watchMain() {
return origCreateProgram(rootNames, options, host, oldProgram);
};
var origPostProgramCreate = host.afterProgramCreate;
host.afterProgramCreate = function (program) {
console.log("** We finished making the program! **");
origPostProgramCreate(program);
@@ -127,9 +137,13 @@ function watchMain() {
// `createWatchProgram` creates an initial program, watches files, and updates the program over time.
ts.createWatchProgram(host);
}
function reportDiagnostic(diagnostic) {
console.error("Error", diagnostic.code, ":", ts.flattenDiagnosticMessageText(diagnostic.messageText, formatHost.getNewLine()));
console.error("Error", diagnostic.code, ":",
ts.flattenDiagnosticMessageText(diagnostic.messageText, formatHost.getNewLine())
);
}
/**
* Prints a diagnostic every time the watch status changes.
* This is mainly for messages like "Starting compilation" or "Compilation completed".
@@ -62,7 +62,9 @@ watchMain();
* Please log a "breaking change" issue for any API breaking change affecting this issue
*/
exports.__esModule = true;
var ts = require("typescript");
function watchMain() {
var configPath = ts.findConfigFile(/*searchPath*/ "./", ts.sys.fileExists, "tsconfig.json");
if (!configPath) {
@@ -79,6 +81,7 @@ function watchMain() {
// For pure type-checking scenarios, or when another tool/process handles emit, using `createSemanticDiagnosticsBuilderProgram` may be more desirable.
// Note that there is another overload for `createWatchCompilerHost` that takes a set of root files.
var host = ts.createWatchCompilerHost(configPath, {}, ts.sys);
// You can technically override any given hook on the host, though you probably don't need to.
// Note that we're assuming `origCreateProgram` and `origPostProgramCreate` doesn't use `this` at all.
var origCreateProgram = host.createProgram;
@@ -87,6 +90,7 @@ function watchMain() {
return origCreateProgram(rootNames, options, host, oldProgram);
};
var origPostProgramCreate = host.afterProgramCreate;
host.afterProgramCreate = function (program) {
console.log("** We finished making the program! **");
origPostProgramCreate(program);
@@ -69,14 +69,18 @@ watchMain();
* Please log a "breaking change" issue for any API breaking change affecting this issue
*/
exports.__esModule = true;
var ts = require("typescript");
function watchMain() {
// get list of files and compiler options somehow
var files = [];
var options = {};
var host = {
rootFiles: files,
options: options,
useCaseSensitiveFileNames: function () { return ts.sys.useCaseSensitiveFileNames; },
getNewLine: function () { return ts.sys.newLine; },
getCurrentDirectory: ts.sys.getCurrentDirectory,
@@ -91,6 +95,7 @@ function watchMain() {
watchDirectory: ts.sys.watchDirectory,
createProgram: ts.createAbstractBuilder
};
// You can technically override any given hook on the host, though you probably don't need to.
// Note that we're assuming `origCreateProgram` and `origPostProgramCreate` doesn't use `this` at all.
var origCreateProgram = host.createProgram;
@@ -99,6 +104,7 @@ function watchMain() {
return origCreateProgram(rootNames, options, host, oldProgram);
};
var origPostProgramCreate = host.afterProgramCreate;
host.afterProgramCreate = function (program) {
console.log("** We finished making the program! **");
origPostProgramCreate(program);
@@ -54,11 +54,15 @@ compile(process.argv.slice(2), {
*/
exports.__esModule = true;
exports.compile = void 0;
var ts = require("typescript");
function compile(fileNames, options) {
var program = ts.createProgram(fileNames, options);
var emitResult = program.emit();
var allDiagnostics = ts.getPreEmitDiagnostics(program);
allDiagnostics.forEach(function (diagnostic) {
var message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
if (!diagnostic.file) {
@@ -68,11 +72,11 @@ function compile(fileNames, options) {
var _a = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start), line = _a.line, character = _a.character;
console.log(diagnostic.file.fileName + " (" + (line + 1) + "," + (character + 1) + "): " + message);
});
var exitCode = emitResult.emitSkipped ? 1 : 0;
console.log("Process exiting with code '" + exitCode + "'.");
process.exit(exitCode);
}
exports.compile = compile;
}exports.compile = compile;
compile(process.argv.slice(2), {
noEmitOnError: true, noImplicitAny: true,
target: ts.ScriptTarget.ES5, module: ts.ModuleKind.CommonJS
+15 -1
View File
@@ -129,19 +129,26 @@ function getSomeOtherTags(node: ts.Node) {
* Please log a "breaking change" issue for any API breaking change affecting this issue
*/
exports.__esModule = true;
var ts = require("typescript");
// excerpted from https://github.com/YousefED/typescript-json-schema
// (converted from a method and modified; for example, `this: any` to compensate, among other changes)
function parseCommentsIntoDefinition(symbol, definition, otherAnnotations) {
function parseCommentsIntoDefinition(
symbol,
definition,
otherAnnotations) {
var _this = this;
if (!symbol) {
return;
}
// the comments for a symbol
var comments = symbol.getDocumentationComment(undefined);
if (comments.length) {
definition.description = comments.map(function (comment) { return comment.kind === "lineBreak" ? comment.text : comment.text.trim().replace(/\r\n/g, "\n"); }).join("");
}
// jsdocs are separate from comments
var jsdocs = symbol.getJsDocTags();
jsdocs.forEach(function (doc) {
@@ -156,6 +163,8 @@ function parseCommentsIntoDefinition(symbol, definition, otherAnnotations) {
}
});
}
function getAnnotations(node) {
var _this = this;
var symbol = node.symbol;
@@ -171,10 +180,12 @@ function getAnnotations(node) {
if (value !== undefined) {
result[jsDocTag.name] = value;
}
return result;
}, {});
return Object.keys(annotations).length ? annotations : undefined;
}
// these examples are artificial and mostly nonsensical
function parseSpecificTags(node) {
if (node.kind === ts.SyntaxKind.Parameter) {
@@ -193,6 +204,7 @@ function parseSpecificTags(node) {
}
}
}
function getReturnTypeFromJSDoc(node) {
if (node.kind === ts.SyntaxKind.FunctionDeclaration) {
return ts.getJSDocReturnType(node);
@@ -202,9 +214,11 @@ function getReturnTypeFromJSDoc(node) {
return type.type;
}
}
function getAllTags(node) {
ts.getJSDocTags(node);
}
function getSomeOtherTags(node) {
var tags = [];
tags.push(ts.getJSDocAugmentsTag(node));
@@ -79,7 +79,9 @@ fileNames.forEach(fileName => {
*/
exports.__esModule = true;
exports.delint = void 0;
var ts = require("typescript");
function delint(sourceFile) {
delintNode(sourceFile);
function delintNode(node) {
@@ -92,6 +94,7 @@ function delint(sourceFile) {
report(node, "A looping statement's contents should be wrapped in a block body.");
}
break;
case ts.SyntaxKind.IfStatement:
var ifStatement = node;
if (ifStatement.thenStatement.kind !== ts.SyntaxKind.Block) {
@@ -103,6 +106,7 @@ function delint(sourceFile) {
report(ifStatement.elseStatement, "An else statement's contents should be wrapped in a block body.");
}
break;
case ts.SyntaxKind.BinaryExpression:
var op = node.operatorToken.kind;
if (op === ts.SyntaxKind.EqualsEqualsToken || op == ts.SyntaxKind.ExclamationEqualsToken) {
@@ -112,12 +116,13 @@ function delint(sourceFile) {
}
ts.forEachChild(node, delintNode);
}
function report(node, message) {
var _a = sourceFile.getLineAndCharacterOfPosition(node.getStart()), line = _a.line, character = _a.character;
console.log(sourceFile.fileName + " (" + (line + 1) + "," + (character + 1) + "): " + message);
}
}
exports.delint = delint;
}exports.delint = delint;
var fileNames = process.argv.slice(2);
fileNames.forEach(function (fileName) {
// Parse a file
@@ -51,13 +51,16 @@ export function createProgram(rootFiles: string[], compilerOptionsJson: string):
*/
exports.__esModule = true;
exports.createProgram = void 0;
var ts = require("typescript");
function printError(error) {
if (!error) {
return;
}
console.log((error.file && error.file.fileName) + ": " + error.messageText);
}
function createProgram(rootFiles, compilerOptionsJson) {
var _a = ts.parseConfigFileTextToJson("tsconfig.json", compilerOptionsJson), config = _a.config, error = _a.error;
if (error) {
@@ -74,5 +77,4 @@ function createProgram(rootFiles, compilerOptionsJson) {
return undefined;
}
return ts.createProgram(rootFiles, settings.options);
}
exports.createProgram = createProgram;
}exports.createProgram = createProgram;
@@ -30,7 +30,10 @@ console.log(JSON.stringify(result));
* Please log a "breaking change" issue for any API breaking change affecting this issue
*/
exports.__esModule = true;
var ts = require("typescript");
var source = "let x: string = 'string'";
var result = ts.transpile(source, { module: ts.ModuleKind.CommonJS });
console.log(JSON.stringify(result));
+17 -1
View File
@@ -124,13 +124,17 @@ watch(currentDirectoryFiles, { module: ts.ModuleKind.CommonJS });
* Please log a "breaking change" issue for any API breaking change affecting this issue
*/
exports.__esModule = true;
var ts = require("typescript");
function watch(rootFileNames, options) {
var files = {};
// initialize the list of files
rootFileNames.forEach(function (fileName) {
files[fileName] = { version: 0 };
});
// Create the language service host to allow the LS to communicate with the host
var servicesHost = {
getScriptFileNames: function () { return rootFileNames; },
@@ -139,32 +143,40 @@ function watch(rootFileNames, options) {
if (!fs.existsSync(fileName)) {
return undefined;
}
return ts.ScriptSnapshot.fromString(fs.readFileSync(fileName).toString());
},
getCurrentDirectory: function () { return process.cwd(); },
getCompilationSettings: function () { return options; },
getDefaultLibFileName: function (options) { return ts.getDefaultLibFilePath(options); }
};
// Create the language service files
var services = ts.createLanguageService(servicesHost, ts.createDocumentRegistry());
// Now let's watch the files
rootFileNames.forEach(function (fileName) {
// First time around, emit all files
emitFile(fileName);
// Add a watch on the file to handle next change
fs.watchFile(fileName, { persistent: true, interval: 250 }, function (curr, prev) {
fs.watchFile(fileName,
{ persistent: true, interval: 250 }, function (curr, prev) {
// Check timestamp
if (+curr.mtime <= +prev.mtime) {
return;
}
// Update the version to signal a change in the file
files[fileName].version++;
// write the changes to disk
emitFile(fileName);
});
});
function emitFile(fileName) {
var output = services.getEmitOutput(fileName);
if (!output.emitSkipped) {
console.log("Emitting " + fileName);
}
@@ -172,14 +184,17 @@ function watch(rootFileNames, options) {
console.log("Emitting " + fileName + " failed");
logErrors(fileName);
}
output.outputFiles.forEach(function (o) {
fs.writeFileSync(o.name, o.text, "utf8");
});
}
function logErrors(fileName) {
var allDiagnostics = services.getCompilerOptionsDiagnostics()
.concat(services.getSyntacticDiagnostics(fileName))
.concat(services.getSemanticDiagnostics(fileName));
allDiagnostics.forEach(function (diagnostic) {
var message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
if (diagnostic.file) {
@@ -192,6 +207,7 @@ function watch(rootFileNames, options) {
});
}
}
// Initialize files constituting the program as all .ts files in the current directory
var currentDirectoryFiles = fs.readdirSync(process.cwd()).
filter(function (fileName) { return fileName.length >= 3 && fileName.substr(fileName.length - 3, 3) === ".ts"; });
@@ -14,6 +14,7 @@ var cl = Point();
var cl = Point.Origin;
//// [test.js]
var cl;
var cl
;
var cl = Point();
var cl = Point.Origin;
@@ -26,6 +26,7 @@ var p = new A.Point(0, 0); // unexpected error here, bug 840000
//// [test.js]
var p;
var p
;
var p = A.Point.Origin;
var p = new A.Point(0, 0); // unexpected error here, bug 840000
@@ -35,6 +35,7 @@ var A;
A.Point = Point;
})(A || (A = {}));
//// [test.js]
var p;
var p
;
var p = A.Point.Origin;
var p = new A.Point(0, 0); // unexpected error here, bug 840000
@@ -20,6 +20,7 @@ function Point() {
return { x: 0, y: 0 };
}
//// [test.js]
var cl;
var cl
;
var cl = Point();
var cl = Point.Origin;
+1 -2
View File
@@ -6,5 +6,4 @@ var v = (a): => {
//// [ArrowFunction3.js]
var v = (a);
{
}
;
};
@@ -51,6 +51,7 @@ module clodule4 {
//// [ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.js]
// all expected to be errors
var clodule1 = /** @class */ (function () {
function clodule1() {
}
@@ -66,6 +67,7 @@ var clodule2 = /** @class */ (function () {
}());
(function (clodule2) {
var x;
var D = /** @class */ (function () {
function D() {
}
@@ -18,8 +18,7 @@ module clodule {
//// [ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js]
var clodule = /** @class */ (function () {
function clodule() {
}
clodule.fn = function (id) { };
}clodule.fn = function (id) { };
return clodule;
}());
(function (clodule) {
@@ -18,8 +18,7 @@ module clodule {
//// [ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js]
var clodule = /** @class */ (function () {
function clodule() {
}
clodule.fn = function (id) { };
}clodule.fn = function (id) { };
return clodule;
}());
(function (clodule) {
@@ -18,8 +18,7 @@ module clodule {
//// [ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.js]
var clodule = /** @class */ (function () {
function clodule() {
}
clodule.sfn = function (id) { return 42; };
}clodule.sfn = function (id) { return 42; };
return clodule;
}());
(function (clodule) {
@@ -28,6 +28,7 @@ var Point = /** @class */ (function () {
this.x = x;
this.y = y;
}
Point.Origin = function () { return { x: 0, y: 0 }; }; // unexpected error here bug 840246
return Point;
}());
@@ -42,6 +43,7 @@ var A;
this.x = x;
this.y = y;
}
Point.Origin = function () { return { x: 0, y: 0 }; }; // unexpected error here bug 840246
return Point;
}());
@@ -28,6 +28,7 @@ var Point = /** @class */ (function () {
this.x = x;
this.y = y;
}
Point.Origin = function () { return { x: 0, y: 0 }; };
return Point;
}());
@@ -41,6 +42,7 @@ var A;
this.x = x;
this.y = y;
}
Point.Origin = function () { return { x: 0, y: 0 }; };
return Point;
}());
@@ -70,6 +70,7 @@ var X;
//var cl: { x: number; y: number; }
var cl = new X.Y.Point(1, 1);
var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ?
//// [simple.js]
var A = /** @class */ (function () {
function A() {
@@ -69,6 +69,7 @@ var X;
//var cl: { x: number; y: number; }
var cl = new X.Y.Point(1, 1);
var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ?
//// [simple.js]
class A {
}
@@ -7,7 +7,6 @@ class C {
//// [ClassDeclaration11.js]
var C = /** @class */ (function () {
function C() {
}
C.prototype.foo = function () { };
}C.prototype.foo = function () { };
return C;
}());
@@ -7,7 +7,6 @@ class C {
//// [ClassDeclaration13.js]
var C = /** @class */ (function () {
function C() {
}
C.prototype.bar = function () { };
}C.prototype.bar = function () { };
return C;
}());
@@ -6,7 +6,6 @@ class C {
//// [ClassDeclaration15.js]
var C = /** @class */ (function () {
function C() {
}
function C() {}
return C;
}());
@@ -7,7 +7,6 @@ class C {
//// [ClassDeclaration21.js]
var C = /** @class */ (function () {
function C() {
}
C.prototype[1] = function () { };
}C.prototype[1] = function () { };
return C;
}());
@@ -7,7 +7,6 @@ class C {
//// [ClassDeclaration22.js]
var C = /** @class */ (function () {
function C() {
}
C.prototype["bar"] = function () { };
}C.prototype["bar"] = function () { };
return C;
}());
@@ -12,5 +12,5 @@ var C = /** @class */ (function () {
}
return C;
}());
var constructor;
(function () { });
var constructor;(function () { }
);
+1
View File
@@ -9,6 +9,7 @@ for ({ a: b = 1, b: a = ""} of []) {
//// [ES5For-of31.js]
var _a, _b, _c;
var a, b;
for (var _i = 0, _d = []; _i < _d.length; _i++) {
_a = _d[_i], _b = _a.a, b = _b === void 0 ? 1 : _b, _c = _a.b, a = _c === void 0 ? "" : _c;
a;
+1
View File
@@ -12,6 +12,7 @@ for (var _i = 0, _a = []; _i < _a.length; _i++) {
var w = _a[_i];
var x = w;
}
for (var _b = 0, _c = []; _b < _c.length; _b++) {
var v = _c[_b];
var x = [w, v];
@@ -18,8 +18,7 @@ for (var v of new StringIterator) { }
// In ES3/5, you cannot for...of over an arbitrary iterable.
var StringIterator = /** @class */ (function () {
function StringIterator() {
}
StringIterator.prototype.next = function () {
}StringIterator.prototype.next = function () {
return {
done: true,
value: ""
@@ -5,7 +5,8 @@ strSet.add('World')
for (const str of strSet) { }
//// [ES5For-ofTypeCheck13.js]
var strSet = new Set();
var strSet = new Set()
;
strSet.add('Hello');
strSet.add('World');
for (var _i = 0, strSet_1 = strSet; _i < strSet_1.length; _i++) {
@@ -3,7 +3,8 @@ var union: string | Set<number>
for (const e of union) { }
//// [ES5For-ofTypeCheck14.js]
var union;
var union
;
for (var _i = 0, union_1 = union; _i < union_1.length; _i++) {
var e = union_1[_i];
}
@@ -13,7 +13,10 @@ obj[Symbol.foo];
//// [ES5SymbolProperty1.js]
var _a;
var Symbol;
var obj = (_a = {},
_a[Symbol.foo] = 0,
_a);
_a)
;
obj[Symbol.foo];
@@ -14,10 +14,10 @@ module M {
var M;
(function (M) {
var Symbol;
var C = /** @class */ (function () {
function C() {
}
C.prototype[Symbol.iterator] = function () { };
}C.prototype[Symbol.iterator] = function () { };
return C;
}());
M.C = C;
@@ -9,10 +9,10 @@ class C {
//// [ES5SymbolProperty3.js]
var Symbol;
var C = /** @class */ (function () {
function C() {
}
C.prototype[Symbol.iterator] = function () { };
}C.prototype[Symbol.iterator] = function () { };
return C;
}());
(new C)[Symbol.iterator];
@@ -9,10 +9,10 @@ class C {
//// [ES5SymbolProperty4.js]
var Symbol;
var C = /** @class */ (function () {
function C() {
}
C.prototype[Symbol.iterator] = function () { };
}C.prototype[Symbol.iterator] = function () { };
return C;
}());
(new C)[Symbol.iterator];
@@ -9,10 +9,10 @@ class C {
//// [ES5SymbolProperty5.js]
var Symbol;
var C = /** @class */ (function () {
function C() {
}
C.prototype[Symbol.iterator] = function () { };
}C.prototype[Symbol.iterator] = function () { };
return C;
}());
(new C)[Symbol.iterator](0); // Should error
@@ -8,8 +8,7 @@ class C {
//// [ES5SymbolProperty6.js]
var C = /** @class */ (function () {
function C() {
}
C.prototype[Symbol.iterator] = function () { };
}C.prototype[Symbol.iterator] = function () { };
return C;
}());
(new C)[Symbol.iterator];
@@ -9,10 +9,10 @@ class C {
//// [ES5SymbolProperty7.js]
var Symbol;
var C = /** @class */ (function () {
function C() {
}
C.prototype[Symbol.iterator] = function () { };
}C.prototype[Symbol.iterator] = function () { };
return C;
}());
(new C)[Symbol.iterator];
+2
View File
@@ -13,10 +13,12 @@ for (let num of array) {
//// [ES5for-of32.js]
var array = [1, 2, 3];
var sum = 0;
for (var _i = 0, array_1 = array; _i < array_1.length; _i++) {
var num = array_1[_i];
if (sum === 0) {
array = [4, 5, 6];
}
sum += num;
}
@@ -19,10 +19,10 @@ var y = new enumdule.Point(0, 0);
//// [EnumAndModuleWithSameNameAndCommonRoot.js]
var enumdule;
(function (enumdule) {
enumdule[enumdule["Red"] = 0] = "Red";
enumdule[enumdule["Blue"] = 1] = "Blue";
enumdule[enumdule["Red"] = 0] = "Red";enumdule[enumdule["Blue"] = 1] = "Blue";
})(enumdule || (enumdule = {}));
(function (enumdule) {
var Point = /** @class */ (function () {
function Point(x, y) {
this.x = x;
@@ -34,5 +34,6 @@ var enumdule;
})(enumdule || (enumdule = {}));
var x;
var x = enumdule.Red;
var y;
var y = new enumdule.Point(0, 0);
@@ -13,3 +13,4 @@ var C = /** @class */ (function () {
return C;
}());
module.exports = B;
@@ -22,11 +22,14 @@ module A {
//// [ExportClassWhichExtendsInterfaceWithInaccessibleType.js]
var A;
(function (A) {
var Point2d = /** @class */ (function () {
function Point2d(x, y) {
this.x = x;
this.y = y;
}
Point2d.prototype.fromOrigin = function (p) {
return 1;
};
@@ -36,6 +36,7 @@ var __extends = (this && this.__extends) || (function () {
})();
var A;
(function (A) {
var Point = /** @class */ (function () {
function Point() {
}
@@ -43,15 +44,16 @@ var A;
}());
A.Point = Point;
A.Origin = { x: 0, y: 0 };
var Point3d = /** @class */ (function (_super) {
__extends(Point3d, _super);
function Point3d() {
__extends(Point3d, _super);function Point3d() {
return _super !== null && _super.apply(this, arguments) || this;
}
return Point3d;
}(Point));
A.Point3d = Point3d;
A.Origin3d = { x: 0, y: 0, z: 0 };
var Line = /** @class */ (function () {
function Line(start, end) {
this.start = start;
@@ -18,6 +18,7 @@ module A {
//// [ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.js]
var A;
(function (A) {
var Point = /** @class */ (function () {
function Point() {
}
@@ -40,26 +40,29 @@ var __extends = (this && this.__extends) || (function () {
})();
var A;
(function (A) {
var Point = /** @class */ (function () {
function Point() {
}
return Point;
}());
A.Origin = { x: 0, y: 0 };
var Point3d = /** @class */ (function (_super) {
__extends(Point3d, _super);
function Point3d() {
__extends(Point3d, _super);function Point3d() {
return _super !== null && _super.apply(this, arguments) || this;
}
return Point3d;
}(Point));
A.Point3d = Point3d;
A.Origin3d = { x: 0, y: 0, z: 0 };
var Line = /** @class */ (function () {
function Line(start, end) {
this.start = start;
this.end = end;
}
Line.fromorigin2d = function (p) {
return null;
};
@@ -18,6 +18,7 @@ module A {
//// [ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.js]
var A;
(function (A) {
var Point = /** @class */ (function () {
function Point() {
}
@@ -18,6 +18,7 @@ module A {
//// [ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.js]
var A;
(function (A) {
var Point = /** @class */ (function () {
function Point() {
}
@@ -18,6 +18,7 @@ module A {
//// [ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.js]
var A;
(function (A) {
var Point = /** @class */ (function () {
function Point() {
}
@@ -25,6 +25,11 @@ module A {
//// [ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js]
var A;
(function (A) {
A.Origin = { x: 0, y: 0 };
A.Origin3d = { x: 0, y: 0, z: 0 };
})(A || (A = {}));
@@ -16,3 +16,4 @@ module A {
//// [ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.js]
@@ -26,6 +26,11 @@ module A {
//// [ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js]
var A;
(function (A) {
A.Origin = { x: 0, y: 0 };
A.Origin3d = { x: 0, y: 0, z: 0 };
})(A || (A = {}));
@@ -23,6 +23,7 @@ module A {
//// [ExportModuleWithAccessibleTypesOnItsExportedMembers.js]
var A;
(function (A) {
var Point = /** @class */ (function () {
function Point(x, y) {
this.x = x;
@@ -34,9 +35,11 @@ var A;
var B;
(function (B) {
B.Origin = new Point(0, 0);
var Line = /** @class */ (function () {
function Line(start, end) {
}
Line.fromOrigin = function (p) {
return new Line({ x: 0, y: 0 }, p);
};
@@ -14,6 +14,7 @@ module A {
//// [ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.js]
var A;
(function (A) {
var Point = /** @class */ (function () {
function Point(x, y) {
this.x = x;
@@ -22,5 +23,6 @@ var A;
return Point;
}());
A.Origin = { x: 0, y: 0 };
A.Unity = { start: new Point(0, 0), end: new Point(1, 0) };
})(A || (A = {}));
@@ -14,6 +14,7 @@ module A {
//// [ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.js]
var A;
(function (A) {
var Point = /** @class */ (function () {
function Point(x, y) {
this.x = x;
@@ -14,6 +14,8 @@ module A {
//// [ExportVariableWithAccessibleTypeInTypeAnnotation.js]
var A;
(function (A) {
// valid since Point is exported
A.Origin = { x: 0, y: 0 };
})(A || (A = {}));
@@ -21,8 +21,12 @@ module A {
//// [ExportVariableWithInaccessibleTypeInTypeAnnotation.js]
var A;
(function (A) {
// valid since Point is exported
A.Origin = { x: 0, y: 0 };
// invalid Point3d is not exported
A.Origin3d = { x: 0, y: 0, z: 0 };
})(A || (A = {}));
@@ -62,12 +62,16 @@ var A;
//// [test.js]
var fn;
var fn = A.Point;
var cl;
var cl
;
var cl = A.Point();
var cl = A.Point.Origin; // not expected to be an error.
//// [simple.js]
var B;
(function (B) {
function Point() {
return { x: 0, y: 0 };
}
@@ -78,6 +82,8 @@ var B;
})(B || (B = {}));
var fn;
var fn = B.Point; // not expected to be an error. bug 840000: [corelang] Function of fundule not assignalbe as expected
var cl;
var cl
;
var cl = B.Point();
var cl = B.Point.Origin;
@@ -41,5 +41,7 @@ var B;
//// [test.js]
var fn;
var fn = A.Point;
var cl;
var cl
;
var cl = B.Point.Origin;
@@ -3,7 +3,5 @@ function * foo(a = yield => yield) {
}
//// [FunctionDeclaration10_es6.js]
function* foo(a = yield) { }
yield;
{
function* foo(a = yield) { }yield;{
}
@@ -2,5 +2,4 @@
var v = function * yield() { }
//// [FunctionDeclaration12_es6.js]
var v = function* () { }, yield;
() => { };
var v = function* () { }, yield;() => { };
@@ -3,7 +3,5 @@ function*foo(yield) {
}
//// [FunctionDeclaration5_es6.js]
function* foo() { }
yield;
{
function* foo() { }yield;{
}
@@ -5,5 +5,6 @@ function * foo() {
//// [FunctionDeclaration9_es6.js]
function* foo() {
var v = { [yield]: foo };
var v = { [yield]: foo }
;
}
@@ -9,5 +9,7 @@ var x: typeof M; // Error only a namespace
//// [InvalidNonInstantiatedModule.js]
var m = M; // Error, not instantiated can not be used as var
var x; // Error only a namespace
@@ -12,8 +12,7 @@ class C {
foo() {
// Make sure we don't think of *bar as the start of a generator method.
if (a)
;
* bar;
; * bar;
return bar;
}
}
@@ -19,6 +19,7 @@ var y = new enumdule.Point(0, 0);
//// [ModuleAndEnumWithSameNameAndCommonRoot.js]
var enumdule;
(function (enumdule) {
var Point = /** @class */ (function () {
function Point(x, y) {
this.x = x;
@@ -29,10 +30,10 @@ var enumdule;
enumdule.Point = Point;
})(enumdule || (enumdule = {}));
(function (enumdule) {
enumdule[enumdule["Red"] = 0] = "Red";
enumdule[enumdule["Blue"] = 1] = "Blue";
enumdule[enumdule["Red"] = 0] = "Red";enumdule[enumdule["Blue"] = 1] = "Blue";
})(enumdule || (enumdule = {}));
var x;
var x = enumdule.Red;
var y;
var y = new enumdule.Point(0, 0);
@@ -62,7 +62,12 @@ var A;
// no errors expected, these are all exported
var a;
var a = new A.A();
var AG = new A.AG();
var AG = new A.AG()
;
// errors expected, these are not exported
var a2 = new A.A2();
var ag2 = new A.A2();
@@ -16,16 +16,15 @@ var A;
(function (A) {
var Color;
(function (Color) {
Color[Color["Red"] = 0] = "Red";
Color[Color["Blue"] = 1] = "Blue";
Color[Color["Red"] = 0] = "Red";Color[Color["Blue"] = 1] = "Blue";
})(Color = A.Color || (A.Color = {}));
var Day;
(function (Day) {
Day[Day["Monday"] = 0] = "Monday";
Day[Day["Tuesday"] = 1] = "Tuesday";
Day[Day["Monday"] = 0] = "Monday";Day[Day["Tuesday"] = 1] = "Tuesday";
})(Day || (Day = {}));
})(A || (A = {}));
// not an error since exported
var a = A.Color.Red;
// error not exported
var b = A.Day.Monday;
@@ -32,6 +32,7 @@ var fng2 = A.fng2;
//// [ModuleWithExportedAndNonExportedFunctions.js]
var A;
(function (A) {
function fn(s) {
return true;
}
@@ -43,6 +44,7 @@ var A;
function fn2(s) {
return false;
}
function fng2(s) {
return null;
}
@@ -50,8 +52,11 @@ var A;
// these should not be errors since the functions are exported
var fn;
var fn = A.fn;
var fng;
var fng = A.fng; // bug 838015
// these should be errors since the functions are not exported
var fn2 = A.fn2;
var fng2 = A.fng2;
@@ -54,7 +54,9 @@ var B;
var Geometry;
(function (Geometry) {
var Lines = B;
Geometry.Origin = { x: 0, y: 0 };
// this is valid since B.Line _is_ visible outside Geometry
Geometry.Unit = new Lines.Line(Geometry.Origin, { x: 1, y: 0 });
})(Geometry || (Geometry = {}));
@@ -62,7 +64,10 @@ var Geometry;
var p;
var p;
var p = Geometry.Origin;
var line;
var line = Geometry.Unit;
// not expected to work since non are exported
var line = Geometry.Lines.Line;
@@ -20,5 +20,6 @@ var A;
})(A || (A = {}));
var x;
var x = A.x;
// Error, since y is not exported
var y = A.y;
@@ -40,9 +40,13 @@ var Inner;
var ;
let;
var ;
var A = /** @class */ (function () {
function A() {
}
function A() {}
return A;
}());
var B;
@@ -59,8 +63,7 @@ var Inner;
Inner.c1 = 'a';
Inner.d1 = 1;
var D = /** @class */ (function () {
function D() {
}
function D() {}
return D;
}());
Inner.e1 = new D;
+1 -2
View File
@@ -5,7 +5,6 @@ class C {
//// [Protected3.js]
var C = /** @class */ (function () {
function C() {
}
function C() {}
return C;
}());
+1 -2
View File
@@ -6,7 +6,6 @@ class C {
//// [Protected4.js]
var C = /** @class */ (function () {
function C() {
}
C.prototype.m = function () { };
}C.prototype.m = function () { };
return C;
}());
+1 -2
View File
@@ -6,7 +6,6 @@ class C {
//// [Protected5.js]
var C = /** @class */ (function () {
function C() {
}
C.m = function () { };
}C.m = function () { };
return C;
}());
+1 -2
View File
@@ -6,7 +6,6 @@ class C {
//// [Protected6.js]
var C = /** @class */ (function () {
function C() {
}
C.m = function () { };
}C.m = function () { };
return C;
}());
+1 -2
View File
@@ -6,7 +6,6 @@ class C {
//// [Protected7.js]
var C = /** @class */ (function () {
function C() {
}
C.prototype.m = function () { };
}C.prototype.m = function () { };
return C;
}());
@@ -30,9 +30,11 @@ System.register([], function (exports_1, context_1) {
for (; i < limit; ++i) {
break;
}
for (;; ++i) {
break;
}
for (;;) {
break;
}
@@ -53,8 +53,7 @@ var A;
(function (A) {
var Point = /** @class */ (function () {
function Point() {
}
Point.prototype.fromCarthesian = function (p) {
}Point.prototype.fromCarthesian = function (p) {
return { x: p.x, y: p.y };
};
return Point;
@@ -92,5 +91,7 @@ var X;
})(Y = X.Y || (X.Y = {}));
})(X || (X = {}));
// ensure merges as expected
var l
;
var l;
var l;
@@ -38,9 +38,15 @@ var l: X.Y.Z.Line;
//// [TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.js]
// ensure merges as expected
var p;
var p;
// ensure merges as expected
var l;
var l
;
var l;
@@ -72,10 +72,13 @@ var A;
})(A || (A = {}));
//// [part3.js]
// test the merging actually worked
var o;
var o;
var o = A.Origin;
var o = A.Utils.mirror(o);
var p;
var p;
var p = new A.Utils.Plane(o, { x: 1, y: 1 });
@@ -38,9 +38,15 @@ var l: X.Y.Z.Line;
//// [TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.js]
// ensure merges as expected
var p;
var p;
// ensure merges as expected
var l;
var l
;
var l;
@@ -68,10 +68,13 @@ var A;
})(A || (A = {}));
//// [part3.js]
// test the merging actually worked
var o;
var o;
var o = A.Origin;
var o = A.Utils.mirror(o);
var p;
var p;
var p = new A.Utils.Plane(o, { x: 1, y: 1 });
@@ -2,5 +2,4 @@
Foo<A,B,\ C>(4, 5, 6);
//// [TypeArgumentList1.js]
Foo < A, B, ;
C > (4, 5, 6);
Foo < A, B, ;C > (4, 5, 6);
@@ -39,9 +39,7 @@ function f2(x: Color | string | string[]) {
//// [TypeGuardWithEnumUnion.js]
var Color;
(function (Color) {
Color[Color["R"] = 0] = "R";
Color[Color["G"] = 1] = "G";
Color[Color["B"] = 2] = "B";
Color[Color["R"] = 0] = "R";Color[Color["G"] = 1] = "G";Color[Color["B"] = 2] = "B";
})(Color || (Color = {}));
function f1(x) {
if (typeof x === "number") {
@@ -53,6 +51,7 @@ function f1(x) {
var z;
}
}
function f2(x) {
if (typeof x === "object") {
var y = x;
@@ -3,4 +3,5 @@ let
x
//// [VariableDeclaration12_es6.js]
let x;
let
x;
@@ -8,6 +8,4 @@ let[0] = 100;
// An ExpressionStatement cannot start with the two token sequence `let [` because
// that would make it ambiguous with a `let` LexicalDeclaration whose first LexicalBinding was an ArrayBindingPattern.
var let;
let [];
0;
100;
let [];0;100;
@@ -9,4 +9,5 @@ var v = { * foo() {
var v = { *foo() {
yield (foo);
}
};
}
;
@@ -20,16 +20,13 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
(function () {
})();(function () {
var A = /** @class */ (function () {
function A() {
}
function A() {}
return A;
}());
var B = /** @class */ (function (_super) {
__extends(B, _super);
function B() {
__extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
@@ -20,16 +20,13 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
(function () {
})();(function () {
var A = /** @class */ (function () {
function A() {
}
function A() {}
return A;
}());
var B = /** @class */ (function (_super) {
__extends(B, _super);
function B() {
__extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
@@ -8,6 +8,7 @@ function foo() {
//// [abstractIdentifierNameStrict.js]
var abstract = true;
function foo() {
"use strict";
var abstract = true;
@@ -41,8 +41,7 @@ var B = /** @class */ (function () {
return B;
}());
var C = /** @class */ (function (_super) {
__extends(C, _super);
function C() {
__extends(C, _super);function C() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.raw = "edge";
_this.ro = "readonly please";
@@ -84,8 +84,7 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var AbstractClass = /** @class */ (function () {
})();var AbstractClass = /** @class */ (function () {
function AbstractClass(str, other) {
var _this = this;
this.other = this.prop;
@@ -99,10 +98,21 @@ var AbstractClass = /** @class */ (function () {
// OK, reference is inside function
var innerFunction = function () {
return _this.prop;
};
}
;
// OK, references are to another instance
other.cb(other.prop);
}
AbstractClass.prototype.method2 = function () {
this.prop = this.prop + "!";
};
@@ -110,12 +120,16 @@ var AbstractClass = /** @class */ (function () {
}());
var DerivedAbstractClass = /** @class */ (function (_super) {
__extends(DerivedAbstractClass, _super);
function DerivedAbstractClass(str, other, yetAnother) {
var _this = _super.call(this, str, other) || this;
_this.cb = function (s) { };
// there is no implementation of 'prop' in any base class
_this.cb(_this.prop.toLowerCase());
_this.method(1);
// OK, references are to another instance
other.cb(other.prop);
yetAnother.cb(yetAnother.prop);
@@ -125,6 +139,9 @@ var DerivedAbstractClass = /** @class */ (function (_super) {
}(AbstractClass));
var Implementation = /** @class */ (function (_super) {
__extends(Implementation, _super);
function Implementation(str, other, yetAnother) {
var _this = _super.call(this, str, other, yetAnother) || this;
_this.prop = "";
@@ -132,6 +149,7 @@ var Implementation = /** @class */ (function (_super) {
_this.cb(_this.prop);
return _this;
}
Implementation.prototype.method = function (n) {
this.cb(this.prop + n);
};
@@ -63,8 +63,7 @@ var B = /** @class */ (function () {
return B;
}());
var C = /** @class */ (function (_super) {
__extends(C, _super);
function C() {
__extends(C, _super);function C() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.ro = "readonly please";
return _this;
@@ -84,8 +83,7 @@ var WrongTypeProperty = /** @class */ (function () {
return WrongTypeProperty;
}());
var WrongTypePropertyImpl = /** @class */ (function (_super) {
__extends(WrongTypePropertyImpl, _super);
function WrongTypePropertyImpl() {
__extends(WrongTypePropertyImpl, _super);function WrongTypePropertyImpl() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.num = "nope, wrong";
return _this;
@@ -98,8 +96,7 @@ var WrongTypeAccessor = /** @class */ (function () {
return WrongTypeAccessor;
}());
var WrongTypeAccessorImpl = /** @class */ (function (_super) {
__extends(WrongTypeAccessorImpl, _super);
function WrongTypeAccessorImpl() {
__extends(WrongTypeAccessorImpl, _super);function WrongTypeAccessorImpl() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(WrongTypeAccessorImpl.prototype, "num", {
@@ -110,8 +107,7 @@ var WrongTypeAccessorImpl = /** @class */ (function (_super) {
return WrongTypeAccessorImpl;
}(WrongTypeAccessor));
var WrongTypeAccessorImpl2 = /** @class */ (function (_super) {
__extends(WrongTypeAccessorImpl2, _super);
function WrongTypeAccessorImpl2() {
__extends(WrongTypeAccessorImpl2, _super);function WrongTypeAccessorImpl2() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.num = "nope, wrong";
return _this;
@@ -10,8 +10,7 @@ class C {
//// [accessInstanceMemberFromStaticMethod01.js]
var C = /** @class */ (function () {
function C() {
}
C.prototype.bar = function () {
}C.prototype.bar = function () {
var k = foo;
};
return C;
@@ -28,8 +28,7 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var Point = /** @class */ (function () {
})();var Point = /** @class */ (function () {
function Point(x, y) {
this.x = x;
this.y = y;
@@ -10,8 +10,7 @@ class C {
//// [accessStaticMemberFromInstanceMethod01.js]
var C = /** @class */ (function () {
function C() {
}
C.bar = function () {
}C.bar = function () {
var k = foo;
};
return C;

Some files were not shown because too many files have changed in this diff Show More