mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'master' into useCRLFByDefaultInTest
This commit is contained in:
+1
-1
@@ -24992,7 +24992,7 @@ var ts;
|
||||
ts.emitTime = 0;
|
||||
ts.ioReadTime = 0;
|
||||
ts.ioWriteTime = 0;
|
||||
ts.version = "1.5.0";
|
||||
ts.version = "1.5.2";
|
||||
var carriageReturnLineFeed = "\r\n";
|
||||
var lineFeed = "\n";
|
||||
function findConfigFile(searchPath) {
|
||||
|
||||
+15
-9
@@ -25376,7 +25376,7 @@ var ts;
|
||||
ts.emitTime = 0;
|
||||
ts.ioReadTime = 0;
|
||||
ts.ioWriteTime = 0;
|
||||
ts.version = "1.5.0";
|
||||
ts.version = "1.5.2";
|
||||
var carriageReturnLineFeed = "\r\n";
|
||||
var lineFeed = "\n";
|
||||
function findConfigFile(searchPath) {
|
||||
@@ -31202,8 +31202,9 @@ var ts;
|
||||
})();
|
||||
ts.CancellationTokenObject = CancellationTokenObject;
|
||||
var HostCache = (function () {
|
||||
function HostCache(host) {
|
||||
function HostCache(host, getCanonicalFileName) {
|
||||
this.host = host;
|
||||
this.getCanonicalFileName = getCanonicalFileName;
|
||||
this.fileNameToEntry = {};
|
||||
var rootFileNames = host.getScriptFileNames();
|
||||
for (var _i = 0; _i < rootFileNames.length; _i++) {
|
||||
@@ -31215,6 +31216,9 @@ var ts;
|
||||
HostCache.prototype.compilationSettings = function () {
|
||||
return this._compilationSettings;
|
||||
};
|
||||
HostCache.prototype.normalizeFileName = function (fileName) {
|
||||
return this.getCanonicalFileName(ts.normalizeSlashes(fileName));
|
||||
};
|
||||
HostCache.prototype.createEntry = function (fileName) {
|
||||
var entry;
|
||||
var scriptSnapshot = this.host.getScriptSnapshot(fileName);
|
||||
@@ -31225,13 +31229,13 @@ var ts;
|
||||
scriptSnapshot: scriptSnapshot
|
||||
};
|
||||
}
|
||||
return this.fileNameToEntry[ts.normalizeSlashes(fileName)] = entry;
|
||||
return this.fileNameToEntry[this.normalizeFileName(fileName)] = entry;
|
||||
};
|
||||
HostCache.prototype.getEntry = function (fileName) {
|
||||
return ts.lookUp(this.fileNameToEntry, ts.normalizeSlashes(fileName));
|
||||
return ts.lookUp(this.fileNameToEntry, this.normalizeFileName(fileName));
|
||||
};
|
||||
HostCache.prototype.contains = function (fileName) {
|
||||
return ts.hasProperty(this.fileNameToEntry, ts.normalizeSlashes(fileName));
|
||||
return ts.hasProperty(this.fileNameToEntry, this.normalizeFileName(fileName));
|
||||
};
|
||||
HostCache.prototype.getOrCreateEntry = function (fileName) {
|
||||
if (this.contains(fileName)) {
|
||||
@@ -31243,8 +31247,10 @@ var ts;
|
||||
var _this = this;
|
||||
var fileNames = [];
|
||||
ts.forEachKey(this.fileNameToEntry, function (key) {
|
||||
if (ts.hasProperty(_this.fileNameToEntry, key) && _this.fileNameToEntry[key])
|
||||
fileNames.push(key);
|
||||
var entry = _this.getEntry(key);
|
||||
if (entry) {
|
||||
fileNames.push(entry.hostFileName);
|
||||
}
|
||||
});
|
||||
return fileNames;
|
||||
};
|
||||
@@ -31774,7 +31780,7 @@ var ts;
|
||||
return ruleProvider;
|
||||
}
|
||||
function synchronizeHostData() {
|
||||
var hostCache = new HostCache(host);
|
||||
var hostCache = new HostCache(host, getCanonicalFileName);
|
||||
if (programUpToDate()) {
|
||||
return;
|
||||
}
|
||||
@@ -31784,7 +31790,7 @@ var ts;
|
||||
var newProgram = ts.createProgram(hostCache.getRootFileNames(), newSettings, {
|
||||
getSourceFile: getOrCreateSourceFile,
|
||||
getCancellationToken: function () { return cancellationToken; },
|
||||
getCanonicalFileName: function (fileName) { return useCaseSensitivefileNames ? fileName : fileName.toLowerCase(); },
|
||||
getCanonicalFileName: getCanonicalFileName,
|
||||
useCaseSensitiveFileNames: function () { return useCaseSensitivefileNames; },
|
||||
getNewLine: function () { return host.getNewLine ? host.getNewLine() : "\r\n"; },
|
||||
getDefaultLibFileName: function (options) { return host.getDefaultLibFileName(options); },
|
||||
|
||||
+15
-9
@@ -29571,7 +29571,7 @@ var ts;
|
||||
/* @internal */ ts.ioReadTime = 0;
|
||||
/* @internal */ ts.ioWriteTime = 0;
|
||||
/** The version of the TypeScript compiler release */
|
||||
ts.version = "1.5.0";
|
||||
ts.version = "1.5.2";
|
||||
var carriageReturnLineFeed = "\r\n";
|
||||
var lineFeed = "\n";
|
||||
function findConfigFile(searchPath) {
|
||||
@@ -36487,8 +36487,9 @@ var ts;
|
||||
// at each language service public entry point, since we don't know when
|
||||
// set of scripts handled by the host changes.
|
||||
var HostCache = (function () {
|
||||
function HostCache(host) {
|
||||
function HostCache(host, getCanonicalFileName) {
|
||||
this.host = host;
|
||||
this.getCanonicalFileName = getCanonicalFileName;
|
||||
// script id => script index
|
||||
this.fileNameToEntry = {};
|
||||
// Initialize the list with the root file names
|
||||
@@ -36503,6 +36504,9 @@ var ts;
|
||||
HostCache.prototype.compilationSettings = function () {
|
||||
return this._compilationSettings;
|
||||
};
|
||||
HostCache.prototype.normalizeFileName = function (fileName) {
|
||||
return this.getCanonicalFileName(ts.normalizeSlashes(fileName));
|
||||
};
|
||||
HostCache.prototype.createEntry = function (fileName) {
|
||||
var entry;
|
||||
var scriptSnapshot = this.host.getScriptSnapshot(fileName);
|
||||
@@ -36513,13 +36517,13 @@ var ts;
|
||||
scriptSnapshot: scriptSnapshot
|
||||
};
|
||||
}
|
||||
return this.fileNameToEntry[ts.normalizeSlashes(fileName)] = entry;
|
||||
return this.fileNameToEntry[this.normalizeFileName(fileName)] = entry;
|
||||
};
|
||||
HostCache.prototype.getEntry = function (fileName) {
|
||||
return ts.lookUp(this.fileNameToEntry, ts.normalizeSlashes(fileName));
|
||||
return ts.lookUp(this.fileNameToEntry, this.normalizeFileName(fileName));
|
||||
};
|
||||
HostCache.prototype.contains = function (fileName) {
|
||||
return ts.hasProperty(this.fileNameToEntry, ts.normalizeSlashes(fileName));
|
||||
return ts.hasProperty(this.fileNameToEntry, this.normalizeFileName(fileName));
|
||||
};
|
||||
HostCache.prototype.getOrCreateEntry = function (fileName) {
|
||||
if (this.contains(fileName)) {
|
||||
@@ -36531,8 +36535,10 @@ var ts;
|
||||
var _this = this;
|
||||
var fileNames = [];
|
||||
ts.forEachKey(this.fileNameToEntry, function (key) {
|
||||
if (ts.hasProperty(_this.fileNameToEntry, key) && _this.fileNameToEntry[key])
|
||||
fileNames.push(key);
|
||||
var entry = _this.getEntry(key);
|
||||
if (entry) {
|
||||
fileNames.push(entry.hostFileName);
|
||||
}
|
||||
});
|
||||
return fileNames;
|
||||
};
|
||||
@@ -37151,7 +37157,7 @@ var ts;
|
||||
}
|
||||
function synchronizeHostData() {
|
||||
// Get a fresh cache of the host information
|
||||
var hostCache = new HostCache(host);
|
||||
var hostCache = new HostCache(host, getCanonicalFileName);
|
||||
// If the program is already up-to-date, we can reuse it
|
||||
if (programUpToDate()) {
|
||||
return;
|
||||
@@ -37168,7 +37174,7 @@ var ts;
|
||||
var newProgram = ts.createProgram(hostCache.getRootFileNames(), newSettings, {
|
||||
getSourceFile: getOrCreateSourceFile,
|
||||
getCancellationToken: function () { return cancellationToken; },
|
||||
getCanonicalFileName: function (fileName) { return useCaseSensitivefileNames ? fileName : fileName.toLowerCase(); },
|
||||
getCanonicalFileName: getCanonicalFileName,
|
||||
useCaseSensitiveFileNames: function () { return useCaseSensitivefileNames; },
|
||||
getNewLine: function () { return host.getNewLine ? host.getNewLine() : "\r\n"; },
|
||||
getDefaultLibFileName: function (options) { return host.getDefaultLibFileName(options); },
|
||||
|
||||
@@ -29571,7 +29571,7 @@ var ts;
|
||||
/* @internal */ ts.ioReadTime = 0;
|
||||
/* @internal */ ts.ioWriteTime = 0;
|
||||
/** The version of the TypeScript compiler release */
|
||||
ts.version = "1.5.0";
|
||||
ts.version = "1.5.2";
|
||||
var carriageReturnLineFeed = "\r\n";
|
||||
var lineFeed = "\n";
|
||||
function findConfigFile(searchPath) {
|
||||
@@ -36487,8 +36487,9 @@ var ts;
|
||||
// at each language service public entry point, since we don't know when
|
||||
// set of scripts handled by the host changes.
|
||||
var HostCache = (function () {
|
||||
function HostCache(host) {
|
||||
function HostCache(host, getCanonicalFileName) {
|
||||
this.host = host;
|
||||
this.getCanonicalFileName = getCanonicalFileName;
|
||||
// script id => script index
|
||||
this.fileNameToEntry = {};
|
||||
// Initialize the list with the root file names
|
||||
@@ -36503,6 +36504,9 @@ var ts;
|
||||
HostCache.prototype.compilationSettings = function () {
|
||||
return this._compilationSettings;
|
||||
};
|
||||
HostCache.prototype.normalizeFileName = function (fileName) {
|
||||
return this.getCanonicalFileName(ts.normalizeSlashes(fileName));
|
||||
};
|
||||
HostCache.prototype.createEntry = function (fileName) {
|
||||
var entry;
|
||||
var scriptSnapshot = this.host.getScriptSnapshot(fileName);
|
||||
@@ -36513,13 +36517,13 @@ var ts;
|
||||
scriptSnapshot: scriptSnapshot
|
||||
};
|
||||
}
|
||||
return this.fileNameToEntry[ts.normalizeSlashes(fileName)] = entry;
|
||||
return this.fileNameToEntry[this.normalizeFileName(fileName)] = entry;
|
||||
};
|
||||
HostCache.prototype.getEntry = function (fileName) {
|
||||
return ts.lookUp(this.fileNameToEntry, ts.normalizeSlashes(fileName));
|
||||
return ts.lookUp(this.fileNameToEntry, this.normalizeFileName(fileName));
|
||||
};
|
||||
HostCache.prototype.contains = function (fileName) {
|
||||
return ts.hasProperty(this.fileNameToEntry, ts.normalizeSlashes(fileName));
|
||||
return ts.hasProperty(this.fileNameToEntry, this.normalizeFileName(fileName));
|
||||
};
|
||||
HostCache.prototype.getOrCreateEntry = function (fileName) {
|
||||
if (this.contains(fileName)) {
|
||||
@@ -36531,8 +36535,10 @@ var ts;
|
||||
var _this = this;
|
||||
var fileNames = [];
|
||||
ts.forEachKey(this.fileNameToEntry, function (key) {
|
||||
if (ts.hasProperty(_this.fileNameToEntry, key) && _this.fileNameToEntry[key])
|
||||
fileNames.push(key);
|
||||
var entry = _this.getEntry(key);
|
||||
if (entry) {
|
||||
fileNames.push(entry.hostFileName);
|
||||
}
|
||||
});
|
||||
return fileNames;
|
||||
};
|
||||
@@ -37151,7 +37157,7 @@ var ts;
|
||||
}
|
||||
function synchronizeHostData() {
|
||||
// Get a fresh cache of the host information
|
||||
var hostCache = new HostCache(host);
|
||||
var hostCache = new HostCache(host, getCanonicalFileName);
|
||||
// If the program is already up-to-date, we can reuse it
|
||||
if (programUpToDate()) {
|
||||
return;
|
||||
@@ -37168,7 +37174,7 @@ var ts;
|
||||
var newProgram = ts.createProgram(hostCache.getRootFileNames(), newSettings, {
|
||||
getSourceFile: getOrCreateSourceFile,
|
||||
getCancellationToken: function () { return cancellationToken; },
|
||||
getCanonicalFileName: function (fileName) { return useCaseSensitivefileNames ? fileName : fileName.toLowerCase(); },
|
||||
getCanonicalFileName: getCanonicalFileName,
|
||||
useCaseSensitiveFileNames: function () { return useCaseSensitivefileNames; },
|
||||
getNewLine: function () { return host.getNewLine ? host.getNewLine() : "\r\n"; },
|
||||
getDefaultLibFileName: function (options) { return host.getDefaultLibFileName(options); },
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"name": "typescript",
|
||||
"author": "Microsoft Corp.",
|
||||
"homepage": "http://typescriptlang.org/",
|
||||
"version": "1.5.0",
|
||||
"version": "1.5.2",
|
||||
"licenses": [
|
||||
{
|
||||
"type": "Apache License 2.0",
|
||||
|
||||
@@ -3566,7 +3566,19 @@ module ts {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Since removeSubtypes checks the subtype relation, and the subtype relation on a union
|
||||
// may attempt to reduce a union, it is possible that removeSubtypes could be called
|
||||
// recursively on the same set of types. The removeSubtypesStack is used to track which
|
||||
// sets of types are currently undergoing subtype reduction.
|
||||
let removeSubtypesStack: string[] = [];
|
||||
function removeSubtypes(types: Type[]) {
|
||||
let typeListId = getTypeListId(types);
|
||||
if (removeSubtypesStack.lastIndexOf(typeListId) >= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
removeSubtypesStack.push(typeListId);
|
||||
|
||||
let i = types.length;
|
||||
while (i > 0) {
|
||||
i--;
|
||||
@@ -3574,6 +3586,8 @@ module ts {
|
||||
types.splice(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
removeSubtypesStack.pop();
|
||||
}
|
||||
|
||||
function containsAnyType(types: Type[]) {
|
||||
|
||||
@@ -139,7 +139,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
let exportEquals: ExportAssignment;
|
||||
let hasExportStars: boolean;
|
||||
|
||||
/** write emitted output to disk*/
|
||||
/** Write emitted output to disk */
|
||||
let writeEmittedFiles = writeJavaScriptFile;
|
||||
|
||||
let detachedCommentsInfo: { nodePos: number; detachedCommentEndPos: number }[];
|
||||
@@ -3059,13 +3059,15 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
}
|
||||
|
||||
function emitVariableStatement(node: VariableStatement) {
|
||||
let startIsEmitted = true;
|
||||
if (!(node.flags & NodeFlags.Export)) {
|
||||
startIsEmitted = tryEmitStartOfVariableDeclarationList(node.declarationList);
|
||||
let startIsEmitted = false;
|
||||
if (node.flags & NodeFlags.Export) {
|
||||
if (isES6ExportedDeclaration(node)) {
|
||||
// Exported ES6 module member
|
||||
write("export ");
|
||||
startIsEmitted = tryEmitStartOfVariableDeclarationList(node.declarationList);
|
||||
}
|
||||
}
|
||||
else if (isES6ExportedDeclaration(node)) {
|
||||
// Exported ES6 module member
|
||||
write("export ");
|
||||
else {
|
||||
startIsEmitted = tryEmitStartOfVariableDeclarationList(node.declarationList);
|
||||
}
|
||||
if (startIsEmitted) {
|
||||
|
||||
@@ -8,7 +8,7 @@ module ts {
|
||||
/* @internal */ export let ioWriteTime = 0;
|
||||
|
||||
/** The version of the TypeScript compiler release */
|
||||
export const version = "1.5.0";
|
||||
export const version = "1.5.2";
|
||||
|
||||
const carriageReturnLineFeed = "\r\n";
|
||||
const lineFeed = "\n";
|
||||
|
||||
+42
-37
@@ -3039,46 +3039,47 @@ module ts {
|
||||
let containingNodeKind = previousToken.parent.kind;
|
||||
switch (previousToken.kind) {
|
||||
case SyntaxKind.CommaToken:
|
||||
return containingNodeKind === SyntaxKind.CallExpression // func( a, |
|
||||
|| containingNodeKind === SyntaxKind.Constructor // constructor( a, | public, protected, private keywords are allowed here, so show completion
|
||||
|| containingNodeKind === SyntaxKind.NewExpression // new C(a, |
|
||||
|| containingNodeKind === SyntaxKind.ArrayLiteralExpression // [a, |
|
||||
|| containingNodeKind === SyntaxKind.BinaryExpression; // let x = (a, |
|
||||
return containingNodeKind === SyntaxKind.CallExpression // func( a, |
|
||||
|| containingNodeKind === SyntaxKind.Constructor // constructor( a, | public, protected, private keywords are allowed here, so show completion
|
||||
|| containingNodeKind === SyntaxKind.NewExpression // new C(a, |
|
||||
|| containingNodeKind === SyntaxKind.ArrayLiteralExpression // [a, |
|
||||
|| containingNodeKind === SyntaxKind.BinaryExpression // let x = (a, |
|
||||
|| containingNodeKind === SyntaxKind.FunctionType; // var x: (s: string, list|
|
||||
|
||||
|
||||
case SyntaxKind.OpenParenToken:
|
||||
return containingNodeKind === SyntaxKind.CallExpression // func( |
|
||||
|| containingNodeKind === SyntaxKind.Constructor // constructor( |
|
||||
|| containingNodeKind === SyntaxKind.NewExpression // new C(a|
|
||||
|| containingNodeKind === SyntaxKind.ParenthesizedExpression; // let x = (a|
|
||||
|| containingNodeKind === SyntaxKind.ParenthesizedExpression // let x = (a|
|
||||
|| containingNodeKind === SyntaxKind.ParenthesizedType; // function F(pred: (a| this can become an arrow function, where 'a' is the argument
|
||||
|
||||
case SyntaxKind.OpenBracketToken:
|
||||
return containingNodeKind === SyntaxKind.ArrayLiteralExpression; // [ |
|
||||
return containingNodeKind === SyntaxKind.ArrayLiteralExpression; // [ |
|
||||
|
||||
case SyntaxKind.ModuleKeyword: // module |
|
||||
case SyntaxKind.NamespaceKeyword: // namespace |
|
||||
case SyntaxKind.ModuleKeyword: // module |
|
||||
case SyntaxKind.NamespaceKeyword: // namespace |
|
||||
return true;
|
||||
|
||||
case SyntaxKind.DotToken:
|
||||
return containingNodeKind === SyntaxKind.ModuleDeclaration; // module A.|
|
||||
return containingNodeKind === SyntaxKind.ModuleDeclaration; // module A.|
|
||||
|
||||
case SyntaxKind.OpenBraceToken:
|
||||
return containingNodeKind === SyntaxKind.ClassDeclaration; // class A{ |
|
||||
return containingNodeKind === SyntaxKind.ClassDeclaration; // class A{ |
|
||||
|
||||
case SyntaxKind.EqualsToken:
|
||||
return containingNodeKind === SyntaxKind.VariableDeclaration // let x = a|
|
||||
|| containingNodeKind === SyntaxKind.BinaryExpression; // x = a|
|
||||
return containingNodeKind === SyntaxKind.VariableDeclaration // let x = a|
|
||||
|| containingNodeKind === SyntaxKind.BinaryExpression; // x = a|
|
||||
|
||||
case SyntaxKind.TemplateHead:
|
||||
return containingNodeKind === SyntaxKind.TemplateExpression; // `aa ${|
|
||||
return containingNodeKind === SyntaxKind.TemplateExpression; // `aa ${|
|
||||
|
||||
case SyntaxKind.TemplateMiddle:
|
||||
return containingNodeKind === SyntaxKind.TemplateSpan; // `aa ${10} dd ${|
|
||||
return containingNodeKind === SyntaxKind.TemplateSpan; // `aa ${10} dd ${|
|
||||
|
||||
case SyntaxKind.PublicKeyword:
|
||||
case SyntaxKind.PrivateKeyword:
|
||||
case SyntaxKind.ProtectedKeyword:
|
||||
return containingNodeKind === SyntaxKind.PropertyDeclaration; // class A{ public |
|
||||
return containingNodeKind === SyntaxKind.PropertyDeclaration; // class A{ public |
|
||||
}
|
||||
|
||||
// Previous token may have been a keyword that was converted to an identifier.
|
||||
@@ -3157,40 +3158,43 @@ module ts {
|
||||
return containingNodeKind === SyntaxKind.VariableDeclaration ||
|
||||
containingNodeKind === SyntaxKind.VariableDeclarationList ||
|
||||
containingNodeKind === SyntaxKind.VariableStatement ||
|
||||
containingNodeKind === SyntaxKind.EnumDeclaration || // enum a { foo, |
|
||||
containingNodeKind === SyntaxKind.EnumDeclaration || // enum a { foo, |
|
||||
isFunction(containingNodeKind) ||
|
||||
containingNodeKind === SyntaxKind.ClassDeclaration || // class A<T, |
|
||||
containingNodeKind === SyntaxKind.FunctionDeclaration || // function A<T, |
|
||||
containingNodeKind === SyntaxKind.InterfaceDeclaration || // interface A<T, |
|
||||
containingNodeKind === SyntaxKind.ArrayBindingPattern || // var [x, y|
|
||||
containingNodeKind === SyntaxKind.ObjectBindingPattern; // function func({ x, y|
|
||||
|
||||
containingNodeKind === SyntaxKind.ClassDeclaration || // class A<T, |
|
||||
containingNodeKind === SyntaxKind.FunctionDeclaration || // function A<T, |
|
||||
containingNodeKind === SyntaxKind.InterfaceDeclaration || // interface A<T, |
|
||||
containingNodeKind === SyntaxKind.ArrayBindingPattern || // var [x, y|
|
||||
containingNodeKind === SyntaxKind.ObjectBindingPattern; // function func({ x, y|
|
||||
|
||||
case SyntaxKind.DotToken:
|
||||
return containingNodeKind === SyntaxKind.ArrayBindingPattern; // var [.|
|
||||
|
||||
return containingNodeKind === SyntaxKind.ArrayBindingPattern; // var [.|
|
||||
|
||||
case SyntaxKind.ColonToken:
|
||||
return containingNodeKind === SyntaxKind.BindingElement; // var {x :html|
|
||||
|
||||
case SyntaxKind.OpenBracketToken:
|
||||
return containingNodeKind === SyntaxKind.ArrayBindingPattern; // var [x|
|
||||
|
||||
return containingNodeKind === SyntaxKind.ArrayBindingPattern; // var [x|
|
||||
|
||||
case SyntaxKind.OpenParenToken:
|
||||
return containingNodeKind === SyntaxKind.CatchClause ||
|
||||
isFunction(containingNodeKind);
|
||||
|
||||
case SyntaxKind.OpenBraceToken:
|
||||
return containingNodeKind === SyntaxKind.EnumDeclaration || // enum a { |
|
||||
containingNodeKind === SyntaxKind.InterfaceDeclaration || // interface a { |
|
||||
containingNodeKind === SyntaxKind.TypeLiteral || // let x : { |
|
||||
containingNodeKind === SyntaxKind.ObjectBindingPattern; // function func({ x|
|
||||
return containingNodeKind === SyntaxKind.EnumDeclaration || // enum a { |
|
||||
containingNodeKind === SyntaxKind.InterfaceDeclaration || // interface a { |
|
||||
containingNodeKind === SyntaxKind.TypeLiteral || // let x : { |
|
||||
containingNodeKind === SyntaxKind.ObjectBindingPattern; // function func({ x|
|
||||
|
||||
case SyntaxKind.SemicolonToken:
|
||||
return containingNodeKind === SyntaxKind.PropertySignature &&
|
||||
previousToken.parent && previousToken.parent.parent &&
|
||||
(previousToken.parent.parent.kind === SyntaxKind.InterfaceDeclaration || // interface a { f; |
|
||||
previousToken.parent.parent.kind === SyntaxKind.TypeLiteral); // let x : { a; |
|
||||
previousToken.parent.parent.kind === SyntaxKind.TypeLiteral); // let x : { a; |
|
||||
|
||||
case SyntaxKind.LessThanToken:
|
||||
return containingNodeKind === SyntaxKind.ClassDeclaration || // class A< |
|
||||
containingNodeKind === SyntaxKind.FunctionDeclaration || // function A< |
|
||||
containingNodeKind === SyntaxKind.InterfaceDeclaration || // interface A< |
|
||||
return containingNodeKind === SyntaxKind.ClassDeclaration || // class A< |
|
||||
containingNodeKind === SyntaxKind.FunctionDeclaration || // function A< |
|
||||
containingNodeKind === SyntaxKind.InterfaceDeclaration || // interface A< |
|
||||
isFunction(containingNodeKind);
|
||||
|
||||
case SyntaxKind.StaticKeyword:
|
||||
@@ -3200,7 +3204,7 @@ module ts {
|
||||
return containingNodeKind === SyntaxKind.Parameter ||
|
||||
containingNodeKind === SyntaxKind.Constructor ||
|
||||
(previousToken.parent && previousToken.parent.parent &&
|
||||
previousToken.parent.parent.kind === SyntaxKind.ArrayBindingPattern); // var [ ...z|
|
||||
previousToken.parent.parent.kind === SyntaxKind.ArrayBindingPattern); // var [...z|
|
||||
|
||||
case SyntaxKind.PublicKeyword:
|
||||
case SyntaxKind.PrivateKeyword:
|
||||
@@ -3218,6 +3222,7 @@ module ts {
|
||||
case SyntaxKind.LetKeyword:
|
||||
case SyntaxKind.ConstKeyword:
|
||||
case SyntaxKind.YieldKeyword:
|
||||
case SyntaxKind.TypeKeyword: // type htm|
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -16,6 +16,5 @@ var A;
|
||||
}
|
||||
return B;
|
||||
})();
|
||||
A.beez;
|
||||
A.beez2 = new Array();
|
||||
})(A || (A = {}));
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts(3,8): error TS1123: Variable declaration list cannot be empty.
|
||||
tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts(4,5): error TS2304: Cannot find name 'let'.
|
||||
tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts(5,10): error TS1123: Variable declaration list cannot be empty.
|
||||
|
||||
|
||||
==== tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts (3 errors) ====
|
||||
|
||||
module Inner {
|
||||
var;
|
||||
|
||||
!!! error TS1123: Variable declaration list cannot be empty.
|
||||
let;
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'let'.
|
||||
const;
|
||||
|
||||
!!! error TS1123: Variable declaration list cannot be empty.
|
||||
|
||||
export var a;
|
||||
export let b;
|
||||
export var c: string;
|
||||
export let d: number;
|
||||
class A {}
|
||||
export var e: A;
|
||||
export let f: A;
|
||||
|
||||
namespace B {
|
||||
export let a = 1, b, c = 2;
|
||||
export let x, y, z;
|
||||
}
|
||||
|
||||
module C {
|
||||
export var a = 1, b, c = 2;
|
||||
export var x, y, z;
|
||||
}
|
||||
|
||||
// Shouldn't be filtered
|
||||
export var a1 = 1;
|
||||
export let b1 = 1;
|
||||
export var c1: string = 'a';
|
||||
export let d1: number = 1;
|
||||
class D {}
|
||||
export var e1 = new D;
|
||||
export let f1 = new D;
|
||||
export var g1: D = new D;
|
||||
export let h1: D = new D;
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
//// [NonInitializedExportInInternalModule.ts]
|
||||
|
||||
module Inner {
|
||||
var;
|
||||
let;
|
||||
const;
|
||||
|
||||
export var a;
|
||||
export let b;
|
||||
export var c: string;
|
||||
export let d: number;
|
||||
class A {}
|
||||
export var e: A;
|
||||
export let f: A;
|
||||
|
||||
namespace B {
|
||||
export let a = 1, b, c = 2;
|
||||
export let x, y, z;
|
||||
}
|
||||
|
||||
module C {
|
||||
export var a = 1, b, c = 2;
|
||||
export var x, y, z;
|
||||
}
|
||||
|
||||
// Shouldn't be filtered
|
||||
export var a1 = 1;
|
||||
export let b1 = 1;
|
||||
export var c1: string = 'a';
|
||||
export let d1: number = 1;
|
||||
class D {}
|
||||
export var e1 = new D;
|
||||
export let f1 = new D;
|
||||
export var g1: D = new D;
|
||||
export let h1: D = new D;
|
||||
}
|
||||
|
||||
//// [NonInitializedExportInInternalModule.js]
|
||||
var Inner;
|
||||
(function (Inner) {
|
||||
var ;
|
||||
let;
|
||||
var ;
|
||||
var A = (function () {
|
||||
function A() {
|
||||
}
|
||||
return A;
|
||||
})();
|
||||
var B;
|
||||
(function (B) {
|
||||
B.a = 1, B.c = 2;
|
||||
})(B || (B = {}));
|
||||
var C;
|
||||
(function (C) {
|
||||
C.a = 1, C.c = 2;
|
||||
})(C || (C = {}));
|
||||
// Shouldn't be filtered
|
||||
Inner.a1 = 1;
|
||||
Inner.b1 = 1;
|
||||
Inner.c1 = 'a';
|
||||
Inner.d1 = 1;
|
||||
var D = (function () {
|
||||
function D() {
|
||||
}
|
||||
return D;
|
||||
})();
|
||||
Inner.e1 = new D;
|
||||
Inner.f1 = new D;
|
||||
Inner.g1 = new D;
|
||||
Inner.h1 = new D;
|
||||
})(Inner || (Inner = {}));
|
||||
-2
@@ -39,14 +39,12 @@ var A;
|
||||
(function (A) {
|
||||
var B;
|
||||
(function (B) {
|
||||
B.x;
|
||||
})(B = A.B || (A.B = {}));
|
||||
})(A || (A = {}));
|
||||
var A;
|
||||
(function (A) {
|
||||
var B;
|
||||
(function (B) {
|
||||
B.x;
|
||||
})(B || (B = {}));
|
||||
})(A || (A = {}));
|
||||
// ensure the right var decl is exported
|
||||
|
||||
@@ -55,7 +55,6 @@ var E;
|
||||
})(E || (E = {}));
|
||||
var M;
|
||||
(function (M) {
|
||||
M.a;
|
||||
})(M || (M = {}));
|
||||
var a;
|
||||
var b;
|
||||
|
||||
@@ -56,7 +56,6 @@ var E;
|
||||
})(E || (E = {}));
|
||||
var M;
|
||||
(function (M) {
|
||||
M.a;
|
||||
})(M || (M = {}));
|
||||
var a;
|
||||
var b;
|
||||
|
||||
@@ -19,7 +19,6 @@ export var a = function () {
|
||||
|
||||
|
||||
//// [aliasUsedAsNameValue_0.js]
|
||||
exports.id;
|
||||
//// [aliasUsedAsNameValue_1.js]
|
||||
function b(a) { return null; }
|
||||
exports.b = b;
|
||||
|
||||
@@ -19,7 +19,6 @@ var __test1__;
|
||||
})(__test1__ || (__test1__ = {}));
|
||||
var __test2__;
|
||||
(function (__test2__) {
|
||||
__test2__.aa;
|
||||
;
|
||||
__test2__.__val__aa = __test2__.aa;
|
||||
})(__test2__ || (__test2__ = {}));
|
||||
|
||||
@@ -19,7 +19,6 @@ var __test1__;
|
||||
})(__test1__ || (__test1__ = {}));
|
||||
var __test2__;
|
||||
(function (__test2__) {
|
||||
__test2__.aa;
|
||||
;
|
||||
__test2__.__val__aa = __test2__.aa;
|
||||
})(__test2__ || (__test2__ = {}));
|
||||
|
||||
@@ -19,7 +19,6 @@ var __test1__;
|
||||
})(__test1__ || (__test1__ = {}));
|
||||
var __test2__;
|
||||
(function (__test2__) {
|
||||
__test2__.aa;
|
||||
;
|
||||
__test2__.__val__aa = __test2__.aa;
|
||||
})(__test2__ || (__test2__ = {}));
|
||||
|
||||
@@ -19,7 +19,6 @@ var __test1__;
|
||||
})(__test1__ || (__test1__ = {}));
|
||||
var __test2__;
|
||||
(function (__test2__) {
|
||||
__test2__.aa;
|
||||
;
|
||||
__test2__.__val__aa = __test2__.aa;
|
||||
})(__test2__ || (__test2__ = {}));
|
||||
|
||||
@@ -19,7 +19,6 @@ var __test1__;
|
||||
})(__test1__ || (__test1__ = {}));
|
||||
var __test2__;
|
||||
(function (__test2__) {
|
||||
__test2__.aa;
|
||||
;
|
||||
__test2__.__val__aa = __test2__.aa;
|
||||
})(__test2__ || (__test2__ = {}));
|
||||
|
||||
@@ -19,7 +19,6 @@ var __test1__;
|
||||
})(__test1__ || (__test1__ = {}));
|
||||
var __test2__;
|
||||
(function (__test2__) {
|
||||
__test2__.aa;
|
||||
;
|
||||
__test2__.__val__aa = __test2__.aa;
|
||||
})(__test2__ || (__test2__ = {}));
|
||||
|
||||
@@ -19,7 +19,6 @@ var __test1__;
|
||||
})(__test1__ || (__test1__ = {}));
|
||||
var __test2__;
|
||||
(function (__test2__) {
|
||||
__test2__.aa;
|
||||
;
|
||||
__test2__.__val__aa = __test2__.aa;
|
||||
})(__test2__ || (__test2__ = {}));
|
||||
|
||||
@@ -19,7 +19,6 @@ var __test1__;
|
||||
})(__test1__ || (__test1__ = {}));
|
||||
var __test2__;
|
||||
(function (__test2__) {
|
||||
__test2__.aa;
|
||||
;
|
||||
__test2__.__val__aa = __test2__.aa;
|
||||
})(__test2__ || (__test2__ = {}));
|
||||
|
||||
@@ -19,7 +19,6 @@ var __test1__;
|
||||
})(__test1__ || (__test1__ = {}));
|
||||
var __test2__;
|
||||
(function (__test2__) {
|
||||
__test2__.aa;
|
||||
;
|
||||
__test2__.__val__aa = __test2__.aa;
|
||||
})(__test2__ || (__test2__ = {}));
|
||||
|
||||
@@ -19,7 +19,6 @@ var __test1__;
|
||||
})(__test1__ || (__test1__ = {}));
|
||||
var __test2__;
|
||||
(function (__test2__) {
|
||||
__test2__.obj;
|
||||
__test2__.__val__obj = __test2__.obj;
|
||||
})(__test2__ || (__test2__ = {}));
|
||||
__test2__.__val__obj = __test1__.__val__obj4;
|
||||
|
||||
@@ -19,7 +19,6 @@ var __test1__;
|
||||
})(__test1__ || (__test1__ = {}));
|
||||
var __test2__;
|
||||
(function (__test2__) {
|
||||
__test2__.obj;
|
||||
__test2__.__val__obj = __test2__.obj;
|
||||
})(__test2__ || (__test2__ = {}));
|
||||
__test2__.__val__obj = __test1__.__val__obj4;
|
||||
|
||||
@@ -19,7 +19,6 @@ var __test1__;
|
||||
})(__test1__ || (__test1__ = {}));
|
||||
var __test2__;
|
||||
(function (__test2__) {
|
||||
__test2__.aa;
|
||||
;
|
||||
__test2__.__val__aa = __test2__.aa;
|
||||
})(__test2__ || (__test2__ = {}));
|
||||
|
||||
@@ -19,7 +19,6 @@ var __test1__;
|
||||
})(__test1__ || (__test1__ = {}));
|
||||
var __test2__;
|
||||
(function (__test2__) {
|
||||
__test2__.aa;
|
||||
;
|
||||
__test2__.__val__aa = __test2__.aa;
|
||||
})(__test2__ || (__test2__ = {}));
|
||||
|
||||
@@ -19,7 +19,6 @@ var __test1__;
|
||||
})(__test1__ || (__test1__ = {}));
|
||||
var __test2__;
|
||||
(function (__test2__) {
|
||||
__test2__.aa;
|
||||
;
|
||||
__test2__.__val__aa = __test2__.aa;
|
||||
})(__test2__ || (__test2__ = {}));
|
||||
|
||||
@@ -19,7 +19,6 @@ var __test1__;
|
||||
})(__test1__ || (__test1__ = {}));
|
||||
var __test2__;
|
||||
(function (__test2__) {
|
||||
__test2__.aa;
|
||||
;
|
||||
__test2__.__val__aa = __test2__.aa;
|
||||
})(__test2__ || (__test2__ = {}));
|
||||
|
||||
@@ -19,7 +19,6 @@ var __test1__;
|
||||
})(__test1__ || (__test1__ = {}));
|
||||
var __test2__;
|
||||
(function (__test2__) {
|
||||
__test2__.aa;
|
||||
;
|
||||
__test2__.__val__aa = __test2__.aa;
|
||||
})(__test2__ || (__test2__ = {}));
|
||||
|
||||
@@ -93,7 +93,6 @@ this = value;
|
||||
// identifiers: module, class, enum, function
|
||||
var M;
|
||||
(function (M) {
|
||||
M.a;
|
||||
})(M || (M = {}));
|
||||
M = value;
|
||||
C = value;
|
||||
|
||||
@@ -79,7 +79,6 @@ x = ''; // Error
|
||||
(x) = ''; // Error
|
||||
var M;
|
||||
(function (M) {
|
||||
M.y;
|
||||
})(M || (M = {}));
|
||||
M.y = 3; // OK
|
||||
(M).y = 3; // OK
|
||||
@@ -93,7 +92,6 @@ var M2;
|
||||
(function (M2) {
|
||||
var M3;
|
||||
(function (M3) {
|
||||
M3.x;
|
||||
})(M3 = M2.M3 || (M2.M3 = {}));
|
||||
M3 = { x: 3 }; // Error
|
||||
})(M2 || (M2 = {}));
|
||||
|
||||
@@ -84,7 +84,6 @@ var A = (function () {
|
||||
})();
|
||||
var M;
|
||||
(function (M) {
|
||||
M.n;
|
||||
})(M || (M = {}));
|
||||
var objA = new A();
|
||||
// any other type var
|
||||
|
||||
@@ -50,7 +50,6 @@ var A = (function () {
|
||||
})();
|
||||
var M;
|
||||
(function (M) {
|
||||
M.n;
|
||||
})(M || (M = {}));
|
||||
var objA = new A();
|
||||
// boolean type var
|
||||
|
||||
@@ -57,7 +57,6 @@ var A = (function () {
|
||||
})();
|
||||
var M;
|
||||
(function (M) {
|
||||
M.n;
|
||||
})(M || (M = {}));
|
||||
var objA = new A();
|
||||
// number type var
|
||||
|
||||
@@ -56,7 +56,6 @@ var A = (function () {
|
||||
})();
|
||||
var M;
|
||||
(function (M) {
|
||||
M.n;
|
||||
})(M || (M = {}));
|
||||
var objA = new A();
|
||||
// string type var
|
||||
|
||||
-1
@@ -27,7 +27,6 @@ var A = (function () {
|
||||
})();
|
||||
var A;
|
||||
(function (A) {
|
||||
A.v;
|
||||
})(A || (A = {}));
|
||||
var Foo;
|
||||
(function (Foo) {
|
||||
|
||||
@@ -16,7 +16,6 @@ export class Test1 {
|
||||
}
|
||||
|
||||
//// [classMemberInitializerWithLamdaScoping3_0.js]
|
||||
exports.field1;
|
||||
//// [classMemberInitializerWithLamdaScoping3_1.js]
|
||||
var Test1 = (function () {
|
||||
function Test1(field1) {
|
||||
|
||||
@@ -6,5 +6,4 @@ export var b: number;
|
||||
//// [commentsBeforeVariableStatement1.js]
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
/** b's comment*/
|
||||
exports.b;
|
||||
});
|
||||
|
||||
@@ -67,7 +67,6 @@ define(["require", "exports"], function (require, exports) {
|
||||
var m1;
|
||||
(function (m1) {
|
||||
/** b's comment*/
|
||||
m1.b;
|
||||
/** foo's comment*/
|
||||
function foo() {
|
||||
return m1.b;
|
||||
@@ -98,7 +97,6 @@ define(["require", "exports"], function (require, exports) {
|
||||
var m4;
|
||||
(function (m4) {
|
||||
/** b's comment */
|
||||
m4.b;
|
||||
/** foo's comment
|
||||
*/
|
||||
function foo() {
|
||||
|
||||
@@ -67,7 +67,6 @@ define(["require", "exports"], function (require, exports) {
|
||||
var m1;
|
||||
(function (m1) {
|
||||
/** b's comment*/
|
||||
m1.b;
|
||||
/** foo's comment*/
|
||||
function foo() {
|
||||
return m1.b;
|
||||
@@ -98,7 +97,6 @@ define(["require", "exports"], function (require, exports) {
|
||||
var m4;
|
||||
(function (m4) {
|
||||
/** b's comment */
|
||||
m4.b;
|
||||
/** foo's comment
|
||||
*/
|
||||
function foo() {
|
||||
|
||||
@@ -66,7 +66,6 @@ export var newVar2 = new extMod.m4.m2.c();
|
||||
var m1;
|
||||
(function (m1) {
|
||||
/** b's comment*/
|
||||
m1.b;
|
||||
/** foo's comment*/
|
||||
function foo() {
|
||||
return m1.b;
|
||||
@@ -97,7 +96,6 @@ var myvar = new m1.m2.c();
|
||||
var m4;
|
||||
(function (m4) {
|
||||
/** b's comment */
|
||||
m4.b;
|
||||
/** foo's comment
|
||||
*/
|
||||
function foo() {
|
||||
|
||||
@@ -102,7 +102,6 @@ new m7.m8.m9.c();
|
||||
var m1;
|
||||
(function (m1) {
|
||||
/** b's comment*/
|
||||
m1.b;
|
||||
/** foo's comment*/
|
||||
function foo() {
|
||||
return m1.b;
|
||||
|
||||
@@ -163,7 +163,6 @@ var m1;
|
||||
return C5;
|
||||
})();
|
||||
m1.C5 = C5;
|
||||
m1.v2;
|
||||
})(m1 || (m1 = {}));
|
||||
var C2 = (function () {
|
||||
function C2() {
|
||||
|
||||
@@ -156,7 +156,6 @@ this += value;
|
||||
// identifiers: module, class, enum, function
|
||||
var M;
|
||||
(function (M) {
|
||||
M.a;
|
||||
})(M || (M = {}));
|
||||
M *= value;
|
||||
M += value;
|
||||
|
||||
@@ -283,7 +283,6 @@ var C4T5 = (function () {
|
||||
// CONTEXT: Module property assignment
|
||||
var C5T5;
|
||||
(function (C5T5) {
|
||||
C5T5.foo;
|
||||
C5T5.foo = function (i, s) {
|
||||
return s;
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,6 @@ export var x: SubModule.m.m3.c;
|
||||
|
||||
//// [declFileAmbientExternalModuleWithSingleExportedModule_0.js]
|
||||
//// [declFileAmbientExternalModuleWithSingleExportedModule_1.js]
|
||||
exports.x;
|
||||
|
||||
|
||||
//// [declFileAmbientExternalModuleWithSingleExportedModule_0.d.ts]
|
||||
|
||||
@@ -24,7 +24,6 @@ export = m;
|
||||
//// [declFileExportAssignmentImportInternalModule.js]
|
||||
var m3;
|
||||
(function (m3) {
|
||||
m3.server;
|
||||
})(m3 || (m3 = {}));
|
||||
var m = m3;
|
||||
module.exports = m;
|
||||
|
||||
@@ -17,7 +17,6 @@ define(["require", "exports"], function (require, exports) {
|
||||
});
|
||||
//// [declFileExportAssignmentOfGenericInterface_1.js]
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
exports.x;
|
||||
exports.x.a;
|
||||
});
|
||||
|
||||
|
||||
@@ -54,7 +54,6 @@ define(["require", "exports", "declFileExportImportChain_b1"], function (require
|
||||
});
|
||||
//// [declFileExportImportChain_d.js]
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
exports.x;
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ define(["require", "exports", "declFileExportImportChain2_b"], function (require
|
||||
});
|
||||
//// [declFileExportImportChain2_d.js]
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
exports.x;
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ export import b = a;
|
||||
var z = b.x;
|
||||
|
||||
//// [declFileForExportedImport_0.js]
|
||||
exports.x;
|
||||
//// [declFileForExportedImport_1.js]
|
||||
///<reference path='declFileForExportedImport_0.ts'/>
|
||||
exports.a = require('declFileForExportedImport_0');
|
||||
|
||||
@@ -80,7 +80,6 @@ var C;
|
||||
})();
|
||||
C.D = D;
|
||||
})(C = exports.C || (exports.C = {}));
|
||||
exports.a;
|
||||
exports.b = C.F;
|
||||
exports.c = C.F2;
|
||||
exports.d = C.F3;
|
||||
|
||||
@@ -34,7 +34,6 @@ module M {
|
||||
//// [declFileTypeAnnotationTypeAlias.js]
|
||||
var M;
|
||||
(function (M) {
|
||||
M.x;
|
||||
var c = (function () {
|
||||
function c() {
|
||||
}
|
||||
@@ -61,7 +60,6 @@ var M;
|
||||
return Window;
|
||||
})();
|
||||
N.Window = Window;
|
||||
N.p;
|
||||
})(N = M.N || (M.N = {}));
|
||||
})(M || (M = {}));
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ var M;
|
||||
return Window;
|
||||
})();
|
||||
N.Window = Window;
|
||||
N.p; // Should report error that W is private
|
||||
// Should report error that W is private
|
||||
})(N = M.N || (M.N = {}));
|
||||
})(M || (M = {}));
|
||||
var M1;
|
||||
@@ -65,7 +65,7 @@ var M1;
|
||||
return Window;
|
||||
})();
|
||||
N.Window = Window;
|
||||
N.p; // No error
|
||||
// No error
|
||||
})(N = M1.N || (M1.N = {}));
|
||||
})(M1 || (M1 = {}));
|
||||
var M2;
|
||||
|
||||
@@ -51,7 +51,6 @@ var m;
|
||||
})();
|
||||
m2.public1 = public1;
|
||||
})(m2 || (m2 = {}));
|
||||
m.x;
|
||||
m.x2 = {
|
||||
x: new private1(),
|
||||
y: new m2.public1(),
|
||||
@@ -61,9 +60,7 @@ var m;
|
||||
};
|
||||
m.x3 = m.x;
|
||||
// Function type
|
||||
m.y;
|
||||
m.y2 = m.y;
|
||||
// constructor type
|
||||
m.z;
|
||||
m.z2 = m.z;
|
||||
})(m || (m = {}));
|
||||
|
||||
@@ -50,11 +50,9 @@ var m;
|
||||
// Directly using names from this module
|
||||
var x;
|
||||
var y = new private1();
|
||||
m.k;
|
||||
m.l = new private1();
|
||||
var x2;
|
||||
var y2 = new public1();
|
||||
m.k2;
|
||||
m.l2 = new public1();
|
||||
var m2;
|
||||
(function (m2) {
|
||||
@@ -67,6 +65,5 @@ var m;
|
||||
})(m2 || (m2 = {}));
|
||||
var x3;
|
||||
var y3 = new m2.public2();
|
||||
m.k3;
|
||||
m.l3 = new m2.public2();
|
||||
})(m || (m = {}));
|
||||
|
||||
@@ -16,13 +16,11 @@ var m2_2: typeof m2;
|
||||
//// [declFileTypeofModule.js]
|
||||
var m1;
|
||||
(function (m1) {
|
||||
m1.c;
|
||||
})(m1 || (m1 = {}));
|
||||
var m1_1 = m1;
|
||||
var m1_2;
|
||||
var m2;
|
||||
(function (m2) {
|
||||
m2.d;
|
||||
})(m2 || (m2 = {}));
|
||||
var m2_1 = m2;
|
||||
var m2_2;
|
||||
|
||||
@@ -22,7 +22,6 @@ var m;
|
||||
})();
|
||||
c_1.c = c;
|
||||
})(c = m.c || (m.c = {}));
|
||||
m.a;
|
||||
})(m || (m = {}));
|
||||
module.exports = m;
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ var X;
|
||||
base.C = C;
|
||||
var M;
|
||||
(function (M) {
|
||||
M.v;
|
||||
})(M = base.M || (base.M = {}));
|
||||
(function (E) {
|
||||
})(base.E || (base.E = {}));
|
||||
|
||||
@@ -74,7 +74,7 @@ var M;
|
||||
D[D["f"] = 0] = "f";
|
||||
})(P.D || (P.D = {}));
|
||||
var D = P.D;
|
||||
P.v; // ok
|
||||
// ok
|
||||
P.w = M.D.f; // error, should be typeof M.D.f
|
||||
P.x = M.C.f; // error, should be typeof M.C.f
|
||||
P.x = M.E.f; // error, should be typeof M.E.f
|
||||
|
||||
@@ -9,7 +9,7 @@ export module M {
|
||||
//// [declarationEmit_nameConflictsWithAlias.js]
|
||||
var M;
|
||||
(function (M) {
|
||||
M.w; // Gets emitted as C.I, which is the wrong interface
|
||||
// Gets emitted as C.I, which is the wrong interface
|
||||
})(M = exports.M || (exports.M = {}));
|
||||
|
||||
|
||||
|
||||
@@ -13,5 +13,4 @@ module M2 {
|
||||
//// [decoratorOnImportEquals1.js]
|
||||
var M1;
|
||||
(function (M1) {
|
||||
M1.X;
|
||||
})(M1 || (M1 = {}));
|
||||
|
||||
@@ -10,5 +10,4 @@ import lib = require('./decoratorOnImportEquals2_0');
|
||||
declare function dec<T>(target: T): T;
|
||||
|
||||
//// [decoratorOnImportEquals2_0.js]
|
||||
exports.X;
|
||||
//// [decoratorOnImportEquals2_1.js]
|
||||
|
||||
@@ -61,7 +61,6 @@ var A = (function () {
|
||||
})();
|
||||
var M;
|
||||
(function (M) {
|
||||
M.n;
|
||||
})(M || (M = {}));
|
||||
var objA = new A();
|
||||
// any type var
|
||||
|
||||
@@ -93,7 +93,6 @@ var A = (function () {
|
||||
})();
|
||||
var M;
|
||||
(function (M) {
|
||||
M.n;
|
||||
})(M || (M = {}));
|
||||
var objA = new A();
|
||||
// any type var
|
||||
|
||||
@@ -50,7 +50,6 @@ var A = (function () {
|
||||
})();
|
||||
var M;
|
||||
(function (M) {
|
||||
M.n;
|
||||
})(M || (M = {}));
|
||||
var objA = new A();
|
||||
// number type var
|
||||
|
||||
@@ -59,7 +59,6 @@ var A = (function () {
|
||||
})();
|
||||
var M;
|
||||
(function (M) {
|
||||
M.n;
|
||||
})(M || (M = {}));
|
||||
var objA = new A();
|
||||
//number type var
|
||||
|
||||
@@ -66,7 +66,6 @@ var A = (function () {
|
||||
})();
|
||||
var M;
|
||||
(function (M) {
|
||||
M.n;
|
||||
})(M || (M = {}));
|
||||
var objA = new A();
|
||||
// boolean type var
|
||||
|
||||
@@ -78,7 +78,6 @@ var A = (function () {
|
||||
})();
|
||||
var M;
|
||||
(function (M) {
|
||||
M.n;
|
||||
})(M || (M = {}));
|
||||
var objA = new A();
|
||||
// string type var
|
||||
|
||||
@@ -62,7 +62,6 @@ var f5 = function (a) {
|
||||
};
|
||||
var U;
|
||||
(function (U) {
|
||||
U.x;
|
||||
})(U || (U = {}));
|
||||
var f6 = function (t) {
|
||||
if (t === void 0) { t = T; }
|
||||
|
||||
@@ -83,7 +83,6 @@ var A = (function () {
|
||||
})();
|
||||
var M;
|
||||
(function (M) {
|
||||
M.n;
|
||||
})(M || (M = {}));
|
||||
var objA = new A();
|
||||
// any type var
|
||||
|
||||
@@ -50,7 +50,6 @@ var A = (function () {
|
||||
})();
|
||||
var M;
|
||||
(function (M) {
|
||||
M.n;
|
||||
})(M || (M = {}));
|
||||
var objA = new A();
|
||||
// boolean type var
|
||||
|
||||
@@ -58,7 +58,6 @@ var A = (function () {
|
||||
})();
|
||||
var M;
|
||||
(function (M) {
|
||||
M.n;
|
||||
})(M || (M = {}));
|
||||
var objA = new A();
|
||||
// number type var
|
||||
|
||||
@@ -57,7 +57,6 @@ var A = (function () {
|
||||
})();
|
||||
var M;
|
||||
(function (M) {
|
||||
M.n;
|
||||
})(M || (M = {}));
|
||||
var objA = new A();
|
||||
// string type var
|
||||
|
||||
@@ -117,7 +117,7 @@ var Foo = (function () {
|
||||
})();
|
||||
var Foo;
|
||||
(function (Foo) {
|
||||
Foo.x; // error for redeclaring var in a different parent
|
||||
// error for redeclaring var in a different parent
|
||||
})(Foo || (Foo = {}));
|
||||
var N;
|
||||
(function (N) {
|
||||
|
||||
@@ -83,9 +83,9 @@ define(["require", "exports"], function (require, exports) {
|
||||
var M2;
|
||||
(function (M2) {
|
||||
var v;
|
||||
M2.v; // one error (visibility)
|
||||
// one error (visibility)
|
||||
var w;
|
||||
M2.w; // two errors (visibility and type mismatch)
|
||||
// two errors (visibility and type mismatch)
|
||||
})(M2 || (M2 = {}));
|
||||
var M;
|
||||
(function (M) {
|
||||
|
||||
@@ -140,11 +140,9 @@ b++;
|
||||
// modules
|
||||
var moduleType1;
|
||||
(function (moduleType1) {
|
||||
moduleType1.baz1;
|
||||
})(moduleType1 || (moduleType1 = {}));
|
||||
var moduleType\u0032;
|
||||
(function (moduleType2) {
|
||||
moduleType2.baz2;
|
||||
})(moduleType\u0032 || (moduleType\u0032 = {}));
|
||||
moduleType1.baz1 = 3;
|
||||
moduleType\u0031.baz1 = 3;
|
||||
|
||||
@@ -12,7 +12,6 @@ export = M2; // should not error
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
var M;
|
||||
(function (M) {
|
||||
M.x;
|
||||
})(M || (M = {}));
|
||||
var M2 = M;
|
||||
return M2;
|
||||
|
||||
@@ -16,7 +16,6 @@ var n: number = modM.x;
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
var M;
|
||||
(function (M) {
|
||||
M.x;
|
||||
})(M || (M = {}));
|
||||
return M;
|
||||
});
|
||||
|
||||
@@ -25,7 +25,6 @@ export = M;
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
var M;
|
||||
(function (M) {
|
||||
M.server;
|
||||
})(M || (M = {}));
|
||||
return M;
|
||||
});
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
tests/cases/conformance/externalModules/exportNonInitializedVariablesAMD.ts(2,4): error TS1123: Variable declaration list cannot be empty.
|
||||
tests/cases/conformance/externalModules/exportNonInitializedVariablesAMD.ts(3,1): error TS2304: Cannot find name 'let'.
|
||||
tests/cases/conformance/externalModules/exportNonInitializedVariablesAMD.ts(4,6): error TS1123: Variable declaration list cannot be empty.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/exportNonInitializedVariablesAMD.ts (3 errors) ====
|
||||
|
||||
var;
|
||||
|
||||
!!! error TS1123: Variable declaration list cannot be empty.
|
||||
let;
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'let'.
|
||||
const;
|
||||
|
||||
!!! error TS1123: Variable declaration list cannot be empty.
|
||||
|
||||
export var a;
|
||||
export let b;
|
||||
export var c: string;
|
||||
export let d: number;
|
||||
class A {}
|
||||
export var e: A;
|
||||
export let f: A;
|
||||
|
||||
namespace B {
|
||||
export let a = 1, b, c = 2;
|
||||
export let x, y, z;
|
||||
}
|
||||
|
||||
module C {
|
||||
export var a = 1, b, c = 2;
|
||||
export var x, y, z;
|
||||
}
|
||||
|
||||
// Shouldn't be filtered
|
||||
export var a1 = 1;
|
||||
export let b1 = 1;
|
||||
export var c1: string = 'a';
|
||||
export let d1: number = 1;
|
||||
class D {}
|
||||
export var e1 = new D;
|
||||
export let f1 = new D;
|
||||
export var g1: D = new D;
|
||||
export let h1: D = new D;
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
//// [exportNonInitializedVariablesAMD.ts]
|
||||
|
||||
var;
|
||||
let;
|
||||
const;
|
||||
|
||||
export var a;
|
||||
export let b;
|
||||
export var c: string;
|
||||
export let d: number;
|
||||
class A {}
|
||||
export var e: A;
|
||||
export let f: A;
|
||||
|
||||
namespace B {
|
||||
export let a = 1, b, c = 2;
|
||||
export let x, y, z;
|
||||
}
|
||||
|
||||
module C {
|
||||
export var a = 1, b, c = 2;
|
||||
export var x, y, z;
|
||||
}
|
||||
|
||||
// Shouldn't be filtered
|
||||
export var a1 = 1;
|
||||
export let b1 = 1;
|
||||
export var c1: string = 'a';
|
||||
export let d1: number = 1;
|
||||
class D {}
|
||||
export var e1 = new D;
|
||||
export let f1 = new D;
|
||||
export var g1: D = new D;
|
||||
export let h1: D = new D;
|
||||
|
||||
|
||||
//// [exportNonInitializedVariablesAMD.js]
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
var ;
|
||||
let;
|
||||
var ;
|
||||
var A = (function () {
|
||||
function A() {
|
||||
}
|
||||
return A;
|
||||
})();
|
||||
var B;
|
||||
(function (B) {
|
||||
B.a = 1, B.c = 2;
|
||||
})(B || (B = {}));
|
||||
var C;
|
||||
(function (C) {
|
||||
C.a = 1, C.c = 2;
|
||||
})(C || (C = {}));
|
||||
// Shouldn't be filtered
|
||||
exports.a1 = 1;
|
||||
exports.b1 = 1;
|
||||
exports.c1 = 'a';
|
||||
exports.d1 = 1;
|
||||
var D = (function () {
|
||||
function D() {
|
||||
}
|
||||
return D;
|
||||
})();
|
||||
exports.e1 = new D;
|
||||
exports.f1 = new D;
|
||||
exports.g1 = new D;
|
||||
exports.h1 = new D;
|
||||
});
|
||||
@@ -0,0 +1,46 @@
|
||||
tests/cases/conformance/externalModules/exportNonInitializedVariablesCommonJS.ts(2,4): error TS1123: Variable declaration list cannot be empty.
|
||||
tests/cases/conformance/externalModules/exportNonInitializedVariablesCommonJS.ts(3,1): error TS2304: Cannot find name 'let'.
|
||||
tests/cases/conformance/externalModules/exportNonInitializedVariablesCommonJS.ts(4,6): error TS1123: Variable declaration list cannot be empty.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/exportNonInitializedVariablesCommonJS.ts (3 errors) ====
|
||||
|
||||
var;
|
||||
|
||||
!!! error TS1123: Variable declaration list cannot be empty.
|
||||
let;
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'let'.
|
||||
const;
|
||||
|
||||
!!! error TS1123: Variable declaration list cannot be empty.
|
||||
|
||||
export var a;
|
||||
export let b;
|
||||
export var c: string;
|
||||
export let d: number;
|
||||
class A {}
|
||||
export var e: A;
|
||||
export let f: A;
|
||||
|
||||
namespace B {
|
||||
export let a = 1, b, c = 2;
|
||||
export let x, y, z;
|
||||
}
|
||||
|
||||
module C {
|
||||
export var a = 1, b, c = 2;
|
||||
export var x, y, z;
|
||||
}
|
||||
|
||||
// Shouldn't be filtered
|
||||
export var a1 = 1;
|
||||
export let b1 = 1;
|
||||
export var c1: string = 'a';
|
||||
export let d1: number = 1;
|
||||
class D {}
|
||||
export var e1 = new D;
|
||||
export let f1 = new D;
|
||||
export var g1: D = new D;
|
||||
export let h1: D = new D;
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
//// [exportNonInitializedVariablesCommonJS.ts]
|
||||
|
||||
var;
|
||||
let;
|
||||
const;
|
||||
|
||||
export var a;
|
||||
export let b;
|
||||
export var c: string;
|
||||
export let d: number;
|
||||
class A {}
|
||||
export var e: A;
|
||||
export let f: A;
|
||||
|
||||
namespace B {
|
||||
export let a = 1, b, c = 2;
|
||||
export let x, y, z;
|
||||
}
|
||||
|
||||
module C {
|
||||
export var a = 1, b, c = 2;
|
||||
export var x, y, z;
|
||||
}
|
||||
|
||||
// Shouldn't be filtered
|
||||
export var a1 = 1;
|
||||
export let b1 = 1;
|
||||
export var c1: string = 'a';
|
||||
export let d1: number = 1;
|
||||
class D {}
|
||||
export var e1 = new D;
|
||||
export let f1 = new D;
|
||||
export var g1: D = new D;
|
||||
export let h1: D = new D;
|
||||
|
||||
|
||||
//// [exportNonInitializedVariablesCommonJS.js]
|
||||
var ;
|
||||
let;
|
||||
var ;
|
||||
var A = (function () {
|
||||
function A() {
|
||||
}
|
||||
return A;
|
||||
})();
|
||||
var B;
|
||||
(function (B) {
|
||||
B.a = 1, B.c = 2;
|
||||
})(B || (B = {}));
|
||||
var C;
|
||||
(function (C) {
|
||||
C.a = 1, C.c = 2;
|
||||
})(C || (C = {}));
|
||||
// Shouldn't be filtered
|
||||
exports.a1 = 1;
|
||||
exports.b1 = 1;
|
||||
exports.c1 = 'a';
|
||||
exports.d1 = 1;
|
||||
var D = (function () {
|
||||
function D() {
|
||||
}
|
||||
return D;
|
||||
})();
|
||||
exports.e1 = new D;
|
||||
exports.f1 = new D;
|
||||
exports.g1 = new D;
|
||||
exports.h1 = new D;
|
||||
@@ -0,0 +1,46 @@
|
||||
tests/cases/conformance/externalModules/exportNonInitializedVariablesES6.ts(2,4): error TS1123: Variable declaration list cannot be empty.
|
||||
tests/cases/conformance/externalModules/exportNonInitializedVariablesES6.ts(3,1): error TS2304: Cannot find name 'let'.
|
||||
tests/cases/conformance/externalModules/exportNonInitializedVariablesES6.ts(4,6): error TS1123: Variable declaration list cannot be empty.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/exportNonInitializedVariablesES6.ts (3 errors) ====
|
||||
|
||||
var;
|
||||
|
||||
!!! error TS1123: Variable declaration list cannot be empty.
|
||||
let;
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'let'.
|
||||
const;
|
||||
|
||||
!!! error TS1123: Variable declaration list cannot be empty.
|
||||
|
||||
export var a;
|
||||
export let b;
|
||||
export var c: string;
|
||||
export let d: number;
|
||||
class A {}
|
||||
export var e: A;
|
||||
export let f: A;
|
||||
|
||||
namespace B {
|
||||
export let a = 1, b, c = 2;
|
||||
export let x, y, z;
|
||||
}
|
||||
|
||||
module C {
|
||||
export var a = 1, b, c = 2;
|
||||
export var x, y, z;
|
||||
}
|
||||
|
||||
// Shouldn't be filtered
|
||||
export var a1 = 1;
|
||||
export let b1 = 1;
|
||||
export var c1: string = 'a';
|
||||
export let d1: number = 1;
|
||||
class D {}
|
||||
export var e1 = new D;
|
||||
export let f1 = new D;
|
||||
export var g1: D = new D;
|
||||
export let h1: D = new D;
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
//// [exportNonInitializedVariablesES6.ts]
|
||||
|
||||
var;
|
||||
let;
|
||||
const;
|
||||
|
||||
export var a;
|
||||
export let b;
|
||||
export var c: string;
|
||||
export let d: number;
|
||||
class A {}
|
||||
export var e: A;
|
||||
export let f: A;
|
||||
|
||||
namespace B {
|
||||
export let a = 1, b, c = 2;
|
||||
export let x, y, z;
|
||||
}
|
||||
|
||||
module C {
|
||||
export var a = 1, b, c = 2;
|
||||
export var x, y, z;
|
||||
}
|
||||
|
||||
// Shouldn't be filtered
|
||||
export var a1 = 1;
|
||||
export let b1 = 1;
|
||||
export var c1: string = 'a';
|
||||
export let d1: number = 1;
|
||||
class D {}
|
||||
export var e1 = new D;
|
||||
export let f1 = new D;
|
||||
export var g1: D = new D;
|
||||
export let h1: D = new D;
|
||||
|
||||
|
||||
//// [exportNonInitializedVariablesES6.js]
|
||||
var ;
|
||||
let;
|
||||
const ;
|
||||
export var a;
|
||||
export let b;
|
||||
export var c;
|
||||
export let d;
|
||||
class A {
|
||||
}
|
||||
export var e;
|
||||
export let f;
|
||||
var B;
|
||||
(function (B) {
|
||||
B.a = 1, B.c = 2;
|
||||
})(B || (B = {}));
|
||||
var C;
|
||||
(function (C) {
|
||||
C.a = 1, C.c = 2;
|
||||
})(C || (C = {}));
|
||||
// Shouldn't be filtered
|
||||
export var a1 = 1;
|
||||
export let b1 = 1;
|
||||
export var c1 = 'a';
|
||||
export let d1 = 1;
|
||||
class D {
|
||||
}
|
||||
export var e1 = new D;
|
||||
export let f1 = new D;
|
||||
export var g1 = new D;
|
||||
export let h1 = new D;
|
||||
@@ -0,0 +1,46 @@
|
||||
tests/cases/conformance/externalModules/exportNonInitializedVariablesSystem.ts(2,4): error TS1123: Variable declaration list cannot be empty.
|
||||
tests/cases/conformance/externalModules/exportNonInitializedVariablesSystem.ts(3,1): error TS2304: Cannot find name 'let'.
|
||||
tests/cases/conformance/externalModules/exportNonInitializedVariablesSystem.ts(4,6): error TS1123: Variable declaration list cannot be empty.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/exportNonInitializedVariablesSystem.ts (3 errors) ====
|
||||
|
||||
var;
|
||||
|
||||
!!! error TS1123: Variable declaration list cannot be empty.
|
||||
let;
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'let'.
|
||||
const;
|
||||
|
||||
!!! error TS1123: Variable declaration list cannot be empty.
|
||||
|
||||
export var a;
|
||||
export let b;
|
||||
export var c: string;
|
||||
export let d: number;
|
||||
class A {}
|
||||
export var e: A;
|
||||
export let f: A;
|
||||
|
||||
namespace B {
|
||||
export let a = 1, b, c = 2;
|
||||
export let x, y, z;
|
||||
}
|
||||
|
||||
module C {
|
||||
export var a = 1, b, c = 2;
|
||||
export var x, y, z;
|
||||
}
|
||||
|
||||
// Shouldn't be filtered
|
||||
export var a1 = 1;
|
||||
export let b1 = 1;
|
||||
export var c1: string = 'a';
|
||||
export let d1: number = 1;
|
||||
class D {}
|
||||
export var e1 = new D;
|
||||
export let f1 = new D;
|
||||
export var g1: D = new D;
|
||||
export let h1: D = new D;
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
//// [exportNonInitializedVariablesSystem.ts]
|
||||
|
||||
var;
|
||||
let;
|
||||
const;
|
||||
|
||||
export var a;
|
||||
export let b;
|
||||
export var c: string;
|
||||
export let d: number;
|
||||
class A {}
|
||||
export var e: A;
|
||||
export let f: A;
|
||||
|
||||
namespace B {
|
||||
export let a = 1, b, c = 2;
|
||||
export let x, y, z;
|
||||
}
|
||||
|
||||
module C {
|
||||
export var a = 1, b, c = 2;
|
||||
export var x, y, z;
|
||||
}
|
||||
|
||||
// Shouldn't be filtered
|
||||
export var a1 = 1;
|
||||
export let b1 = 1;
|
||||
export var c1: string = 'a';
|
||||
export let d1: number = 1;
|
||||
class D {}
|
||||
export var e1 = new D;
|
||||
export let f1 = new D;
|
||||
export var g1: D = new D;
|
||||
export let h1: D = new D;
|
||||
|
||||
|
||||
//// [exportNonInitializedVariablesSystem.js]
|
||||
System.register([], function(exports_1) {
|
||||
var a, b, c, d, A, e, f, B, C, a1, b1, c1, d1, D, e1, f1, g1, h1;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
let;
|
||||
A = (function () {
|
||||
function A() {
|
||||
}
|
||||
return A;
|
||||
})();
|
||||
(function (B) {
|
||||
B.a = 1, B.c = 2;
|
||||
})(B || (B = {}));
|
||||
(function (C) {
|
||||
C.a = 1, C.c = 2;
|
||||
})(C || (C = {}));
|
||||
// Shouldn't be filtered
|
||||
exports_1("a1", a1 = 1);
|
||||
exports_1("b1", b1 = 1);
|
||||
exports_1("c1", c1 = 'a');
|
||||
exports_1("d1", d1 = 1);
|
||||
D = (function () {
|
||||
function D() {
|
||||
}
|
||||
return D;
|
||||
})();
|
||||
exports_1("e1", e1 = new D);
|
||||
exports_1("f1", f1 = new D);
|
||||
exports_1("g1", g1 = new D);
|
||||
exports_1("h1", h1 = new D);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,46 @@
|
||||
tests/cases/conformance/externalModules/exportNonInitializedVariablesUMD.ts(2,4): error TS1123: Variable declaration list cannot be empty.
|
||||
tests/cases/conformance/externalModules/exportNonInitializedVariablesUMD.ts(3,1): error TS2304: Cannot find name 'let'.
|
||||
tests/cases/conformance/externalModules/exportNonInitializedVariablesUMD.ts(4,6): error TS1123: Variable declaration list cannot be empty.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/exportNonInitializedVariablesUMD.ts (3 errors) ====
|
||||
|
||||
var;
|
||||
|
||||
!!! error TS1123: Variable declaration list cannot be empty.
|
||||
let;
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'let'.
|
||||
const;
|
||||
|
||||
!!! error TS1123: Variable declaration list cannot be empty.
|
||||
|
||||
export var a;
|
||||
export let b;
|
||||
export var c: string;
|
||||
export let d: number;
|
||||
class A {}
|
||||
export var e: A;
|
||||
export let f: A;
|
||||
|
||||
namespace B {
|
||||
export let a = 1, b, c = 2;
|
||||
export let x, y, z;
|
||||
}
|
||||
|
||||
module C {
|
||||
export var a = 1, b, c = 2;
|
||||
export var x, y, z;
|
||||
}
|
||||
|
||||
// Shouldn't be filtered
|
||||
export var a1 = 1;
|
||||
export let b1 = 1;
|
||||
export var c1: string = 'a';
|
||||
export let d1: number = 1;
|
||||
class D {}
|
||||
export var e1 = new D;
|
||||
export let f1 = new D;
|
||||
export var g1: D = new D;
|
||||
export let h1: D = new D;
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
//// [exportNonInitializedVariablesUMD.ts]
|
||||
|
||||
var;
|
||||
let;
|
||||
const;
|
||||
|
||||
export var a;
|
||||
export let b;
|
||||
export var c: string;
|
||||
export let d: number;
|
||||
class A {}
|
||||
export var e: A;
|
||||
export let f: A;
|
||||
|
||||
namespace B {
|
||||
export let a = 1, b, c = 2;
|
||||
export let x, y, z;
|
||||
}
|
||||
|
||||
module C {
|
||||
export var a = 1, b, c = 2;
|
||||
export var x, y, z;
|
||||
}
|
||||
|
||||
// Shouldn't be filtered
|
||||
export var a1 = 1;
|
||||
export let b1 = 1;
|
||||
export var c1: string = 'a';
|
||||
export let d1: number = 1;
|
||||
class D {}
|
||||
export var e1 = new D;
|
||||
export let f1 = new D;
|
||||
export var g1: D = new D;
|
||||
export let h1: D = new D;
|
||||
|
||||
|
||||
//// [exportNonInitializedVariablesUMD.js]
|
||||
(function (deps, factory) {
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
var v = factory(require, exports); if (v !== undefined) module.exports = v;
|
||||
}
|
||||
else if (typeof define === 'function' && define.amd) {
|
||||
define(deps, factory);
|
||||
}
|
||||
})(["require", "exports"], function (require, exports) {
|
||||
var ;
|
||||
let;
|
||||
var ;
|
||||
var A = (function () {
|
||||
function A() {
|
||||
}
|
||||
return A;
|
||||
})();
|
||||
var B;
|
||||
(function (B) {
|
||||
B.a = 1, B.c = 2;
|
||||
})(B || (B = {}));
|
||||
var C;
|
||||
(function (C) {
|
||||
C.a = 1, C.c = 2;
|
||||
})(C || (C = {}));
|
||||
// Shouldn't be filtered
|
||||
exports.a1 = 1;
|
||||
exports.b1 = 1;
|
||||
exports.c1 = 'a';
|
||||
exports.d1 = 1;
|
||||
var D = (function () {
|
||||
function D() {
|
||||
}
|
||||
return D;
|
||||
})();
|
||||
exports.e1 = new D;
|
||||
exports.f1 = new D;
|
||||
exports.g1 = new D;
|
||||
exports.h1 = new D;
|
||||
});
|
||||
@@ -45,9 +45,5 @@ var foo;
|
||||
return C2;
|
||||
})();
|
||||
// None of the types are exported, so per section 10.3, should all be errors
|
||||
foo.e;
|
||||
foo.f;
|
||||
foo.g;
|
||||
foo.h;
|
||||
})(foo || (foo = {}));
|
||||
var y = foo.g; // Exported variable 'y' has or is using private type 'foo.C2'.
|
||||
|
||||
@@ -55,7 +55,6 @@ define(["require", "exports"], function (require, exports) {
|
||||
exports.E = E;
|
||||
var M;
|
||||
(function (M) {
|
||||
M.x;
|
||||
})(M || (M = {}));
|
||||
exports.M = M;
|
||||
var a = M.x;
|
||||
|
||||
@@ -54,7 +54,6 @@ var E;
|
||||
exports.E = E;
|
||||
var M;
|
||||
(function (M) {
|
||||
M.x;
|
||||
})(M || (M = {}));
|
||||
exports.M = M;
|
||||
var a = M.x;
|
||||
|
||||
@@ -57,7 +57,6 @@ define(["require", "exports"], function (require, exports) {
|
||||
exports.E1 = exports.E;
|
||||
var M;
|
||||
(function (M) {
|
||||
M.x;
|
||||
})(M = exports.M || (exports.M = {}));
|
||||
exports.M1 = exports.M;
|
||||
exports.a = M.x;
|
||||
|
||||
@@ -56,7 +56,6 @@ var E = exports.E;
|
||||
exports.E1 = exports.E;
|
||||
var M;
|
||||
(function (M) {
|
||||
M.x;
|
||||
})(M = exports.M || (exports.M = {}));
|
||||
exports.M1 = exports.M;
|
||||
exports.a = M.x;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user