Fix merge conflict

This commit is contained in:
Ryan Cavanaugh
2016-09-14 09:51:56 -07:00
81 changed files with 664 additions and 335 deletions

1
.gitignore vendored
View File

@@ -54,3 +54,4 @@ internal/
!tests/cases/projects/projectOption/**/node_modules
!tests/cases/projects/NodeModulesSearch/**/*
!tests/baselines/reference/project/nodeModules*/**/*
.idea

View File

@@ -40,10 +40,6 @@ In general, things we find useful when reviewing suggestions are:
# Instructions for Contributing Code
## Code of Conduct
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
## Contributing bug fixes
TypeScript is currently accepting contributions in the form of bug fixes. A bug must have an issue tracking it in the issue tracker that has been approved ("Milestone == Community") by the TypeScript team. Your pull request should include a link to the bug that you are fixing. If you've submitted a PR for a bug, please post a comment in the bug to avoid duplication of effort.

View File

@@ -43,7 +43,7 @@ Error.stackTraceLimit = 1000;
const cmdLineOptions = minimist(process.argv.slice(2), {
boolean: ["debug", "light", "colors", "lint", "soft"],
string: ["browser", "tests", "host", "reporter"],
string: ["browser", "tests", "host", "reporter", "stackTraceLimit"],
alias: {
d: "debug",
t: "tests",
@@ -561,6 +561,7 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
const debug = cmdLineOptions["debug"];
const tests = cmdLineOptions["tests"];
const light = cmdLineOptions["light"];
const stackTraceLimit = cmdLineOptions["stackTraceLimit"];
const testConfigFile = "test.config";
if (fs.existsSync(testConfigFile)) {
fs.unlinkSync(testConfigFile);
@@ -580,7 +581,7 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
}
if (tests || light || taskConfigsFolder) {
writeTestConfigFile(tests, light, taskConfigsFolder, workerCount);
writeTestConfigFile(tests, light, taskConfigsFolder, workerCount, stackTraceLimit);
}
if (tests && tests.toLocaleLowerCase() === "rwc") {
@@ -759,8 +760,8 @@ function cleanTestDirs(done: (e?: any) => void) {
}
// used to pass data from jake command line directly to run.js
function writeTestConfigFile(tests: string, light: boolean, taskConfigsFolder?: string, workerCount?: number) {
const testConfigContents = JSON.stringify({ test: tests ? [tests] : undefined, light: light, workerCount: workerCount, taskConfigsFolder: taskConfigsFolder });
function writeTestConfigFile(tests: string, light: boolean, taskConfigsFolder?: string, workerCount?: number, stackTraceLimit?: string) {
const testConfigContents = JSON.stringify({ test: tests ? [tests] : undefined, light, workerCount, stackTraceLimit, taskConfigsFolder });
console.log("Running tests with config: " + testConfigContents);
fs.writeFileSync("test.config", testConfigContents);
}
@@ -890,7 +891,7 @@ gulp.task(loggedIOJsPath, false, [], (done) => {
const temp = path.join(builtLocalDirectory, "temp");
mkdirP(temp, (err) => {
if (err) { console.error(err); done(err); process.exit(1); };
exec(host, [LKGCompiler, "--outdir", temp, loggedIOpath], () => {
exec(host, [LKGCompiler, "--types --outdir", temp, loggedIOpath], () => {
fs.renameSync(path.join(temp, "/harness/loggedIO.js"), loggedIOJsPath);
del(temp).then(() => done(), done);
}, done);
@@ -911,8 +912,8 @@ gulp.task(instrumenterJsPath, false, [servicesFile], () => {
.pipe(gulp.dest("."));
});
gulp.task("tsc-instrumented", "Builds an instrumented tsc.js", [loggedIOJsPath, instrumenterJsPath, servicesFile], (done) => {
exec(host, [instrumenterJsPath, "record", "iocapture", builtLocalDirectory, compilerFilename], done, done);
gulp.task("tsc-instrumented", "Builds an instrumented tsc.js", ["local", loggedIOJsPath, instrumenterJsPath, servicesFile], (done) => {
exec(host, [instrumenterJsPath, "record", "iocapture", builtLocalCompiler], done, done);
});
gulp.task("update-sublime", "Updates the sublime plugin's tsserver", ["local", serverFile], () => {

View File

@@ -1055,7 +1055,7 @@ var loggedIOJsPath = builtLocalDirectory + 'loggedIO.js';
file(loggedIOJsPath, [builtLocalDirectory, loggedIOpath], function () {
var temp = builtLocalDirectory + 'temp';
jake.mkdirP(temp);
var options = "--outdir " + temp + ' ' + loggedIOpath;
var options = "--types --outdir " + temp + ' ' + loggedIOpath;
var cmd = host + " " + LKGDirectory + compilerFilename + " " + options + " ";
console.log(cmd + "\n");
var ex = jake.createExec([cmd]);

View File

@@ -30,8 +30,12 @@ There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob
* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
* Read the language specification ([docx](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true), [pdf](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.pdf?raw=true), [md](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)).
* Read the language specification ([docx](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true),
[pdf](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.pdf?raw=true), [md](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)).
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see
the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com)
with any additional questions or comments.
## Documentation
@@ -91,4 +95,4 @@ node built/local/tsc.js hello.ts
## Roadmap
For details on our planned features and future direction please refer to our [roadmap](https://github.com/Microsoft/TypeScript/wiki/Roadmap).
For details on our planned features and future direction please refer to our [roadmap](https://github.com/Microsoft/TypeScript/wiki/Roadmap).

View File

@@ -1313,11 +1313,10 @@ namespace ts {
else if (namespace === unknownSymbol) {
return namespace;
}
symbol = getSymbol(getExportsOfSymbol(namespace), right.text, meaning);
if (!symbol) {
if (!ignoreErrors) {
error(right, Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), declarationNameToString(right));
error(right, Diagnostics.Namespace_0_has_no_exported_member_1, getFullyQualifiedName(namespace), declarationNameToString(right));
}
return undefined;
}
@@ -2931,7 +2930,7 @@ namespace ts {
// undefined or any type of the parent.
if (!parentType || isTypeAny(parentType)) {
if (declaration.initializer) {
return getBaseTypeOfLiteralType(checkExpressionCached(declaration.initializer));
return checkDeclarationInitializer(declaration);
}
return parentType;
}
@@ -3102,8 +3101,7 @@ namespace ts {
// Use the type of the initializer expression if one is present
if (declaration.initializer) {
const exprType = checkExpressionCached(declaration.initializer);
const type = getCombinedNodeFlags(declaration) & NodeFlags.Const || getCombinedModifierFlags(declaration) & ModifierFlags.Readonly ? exprType : getBaseTypeOfLiteralType(exprType);
const type = checkDeclarationInitializer(declaration);
return addOptionality(type, /*optional*/ declaration.questionToken && includeOptionality);
}
@@ -3126,8 +3124,7 @@ namespace ts {
// pattern. Otherwise, it is the type any.
function getTypeFromBindingElement(element: BindingElement, includePatternInType?: boolean, reportErrors?: boolean): Type {
if (element.initializer) {
const exprType = checkExpressionCached(element.initializer);
return getCombinedNodeFlags(element) & NodeFlags.Const ? exprType : getBaseTypeOfLiteralType(exprType);
return checkDeclarationInitializer(element);
}
if (isBindingPattern(element.name)) {
return getTypeFromBindingPattern(<BindingPattern>element.name, includePatternInType, reportErrors);
@@ -12099,7 +12096,7 @@ namespace ts {
error(node, Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType));
}
else {
error(node, Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature);
error(node, Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures, typeToString(apparentType));
}
return resolveErrorCall(node);
}
@@ -12261,7 +12258,7 @@ namespace ts {
}
if (!callSignatures.length) {
error(node, Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature);
error(node, Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures, typeToString(apparentType));
return resolveErrorCall(node);
}
@@ -12309,7 +12306,7 @@ namespace ts {
const headMessage = getDiagnosticHeadMessageForDecoratorResolution(node);
if (!callSignatures.length) {
let errorInfo: DiagnosticMessageChain;
errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature);
errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures, typeToString(apparentType));
errorInfo = chainDiagnosticMessages(errorInfo, headMessage);
diagnostics.add(createDiagnosticForNodeFromMessageChain(node, errorInfo));
return resolveErrorCall(node);
@@ -13672,6 +13669,18 @@ namespace ts {
return links.resolvedType;
}
function isTypeAssertion(node: Expression) {
node = skipParenthesizedNodes(node);
return node.kind === SyntaxKind.TypeAssertionExpression || node.kind === SyntaxKind.AsExpression;
}
function checkDeclarationInitializer(declaration: VariableLikeDeclaration) {
const type = checkExpressionCached(declaration.initializer);
return getCombinedNodeFlags(declaration) & NodeFlags.Const ||
getCombinedModifierFlags(declaration) & ModifierFlags.Readonly ||
isTypeAssertion(declaration.initializer) ? type : getBaseTypeOfLiteralType(type);
}
function isLiteralContextualType(contextualType: Type) {
if (contextualType) {
if (contextualType.flags & TypeFlags.TypeParameter) {
@@ -13691,7 +13700,7 @@ namespace ts {
function checkExpressionForMutableLocation(node: Expression, contextualMapper?: TypeMapper): Type {
const type = checkExpression(node, contextualMapper);
return isLiteralContextualType(getContextualType(node)) ? type : getBaseTypeOfLiteralType(type);
return isTypeAssertion(node) || isLiteralContextualType(getContextualType(node)) ? type : getBaseTypeOfLiteralType(type);
}
function checkPropertyAssignment(node: PropertyAssignment, contextualMapper?: TypeMapper): Type {
@@ -18509,7 +18518,7 @@ namespace ts {
// When resolved as an expression identifier, if the given node references an exported entity, return the declaration
// node of the exported entity's container. Otherwise, return undefined.
function getReferencedExportContainer(node: Identifier, prefixLocals?: boolean): SourceFile | ModuleDeclaration | EnumDeclaration {
function getReferencedExportContainer(node: Identifier, prefixLocals?: boolean): SourceFile | ModuleDeclaration | EnumDeclaration | undefined {
node = getParseTreeNode(node, isIdentifier);
if (node) {
// When resolving the export container for the name of a module or enum
@@ -18531,10 +18540,11 @@ namespace ts {
const parentSymbol = getParentOfSymbol(symbol);
if (parentSymbol) {
if (parentSymbol.flags & SymbolFlags.ValueModule && parentSymbol.valueDeclaration.kind === SyntaxKind.SourceFile) {
const symbolFile = <SourceFile>parentSymbol.valueDeclaration;
const referenceFile = getSourceFileOfNode(node);
// If `node` accesses an export and that export isn't in the same file, then symbol is a namespace export, so return undefined.
if (parentSymbol.valueDeclaration === getSourceFileOfNode(node)) {
return <SourceFile>parentSymbol.valueDeclaration;
}
const symbolIsUmdExport = symbolFile !== referenceFile;
return symbolIsUmdExport ? undefined : symbolFile;
}
for (let n = node.parent; n; n = n.parent) {
if (isModuleOrEnumDeclaration(n) && getSymbolOfNode(n) === parentSymbol) {
@@ -18544,8 +18554,6 @@ namespace ts {
}
}
}
return undefined;
}
// When resolved as an expression identifier, if the given node references an import, return the declaration of

View File

@@ -1043,7 +1043,7 @@
"category": "Error",
"code": 2348
},
"Cannot invoke an expression whose type lacks a call signature.": {
"Cannot invoke an expression whose type lacks a call signature. Type '{0}' has no compatible call signatures.": {
"category": "Error",
"code": 2349
},
@@ -1951,10 +1951,15 @@
"category": "Error",
"code": 2693
},
"Left side of comma operator is unused and has no side effects.": {
"Namespace '{0}' has no exported member '{1}'.": {
"category": "Error",
"code": 2694
},
"Left side of comma operator is unused and has no side effects.": {
"category": "Error",
"code": 2695
},
"Import declaration '{0}' is using private name '{1}'.": {
"category": "Error",
"code": 4000

View File

@@ -363,6 +363,7 @@ namespace FourSlash {
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: true,
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: false,
InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: false,
InsertSpaceAfterTypeAssertion: false,
PlaceOpenBraceOnNewLineForFunctions: false,
PlaceOpenBraceOnNewLineForControlBlocks: false,
};

View File

@@ -1,6 +1,8 @@
/// <reference path="..\..\src\compiler\sys.ts" />
/// <reference path="..\..\src\harness\harness.ts" />
/// <reference path="..\..\src\harness\harnessLanguageService.ts" />
/// <reference path="..\..\src\harness\runnerbase.ts" />
/// <reference path="..\..\src\harness\typeWriter.ts" />
interface FileInformation {
contents: string;

View File

@@ -22,11 +22,25 @@
"../compiler/utilities.ts",
"../compiler/binder.ts",
"../compiler/checker.ts",
"../compiler/factory.ts",
"../compiler/visitor.ts",
"../compiler/transformers/ts.ts",
"../compiler/transformers/jsx.ts",
"../compiler/transformers/es7.ts",
"../compiler/transformers/es6.ts",
"../compiler/transformers/generators.ts",
"../compiler/transformers/destructuring.ts",
"../compiler/transformers/module/module.ts",
"../compiler/transformers/module/system.ts",
"../compiler/transformers/module/es6.ts",
"../compiler/transformer.ts",
"../compiler/comments.ts",
"../compiler/sourcemap.ts",
"../compiler/declarationEmitter.ts",
"../compiler/emitter.ts",
"../compiler/program.ts",
"../compiler/commandLineParser.ts",
"../compiler/tsc.ts",
"../compiler/diagnosticInformationMap.generated.ts",
"../services/breakpoints.ts",
"../services/navigateTo.ts",

View File

@@ -13,10 +13,10 @@ interface Array<T> {
find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
* Returns the index of the first element in the array where predicate is true, and -1
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found,
* order, until it finds one where predicate returns true. If such an element is found,
* findIndex immediately returns that element index. Otherwise, findIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
@@ -360,10 +360,10 @@ interface ReadonlyArray<T> {
find(predicate: (value: T, index: number, obj: ReadonlyArray<T>) => boolean, thisArg?: any): T | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
* Returns the index of the first element in the array where predicate is true, and -1
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found,
* order, until it finds one where predicate returns true. If such an element is found,
* findIndex immediately returns that element index. Otherwise, findIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.

18
src/lib/es5.d.ts vendored
View File

@@ -1537,7 +1537,7 @@ interface Int8Array {
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
* Returns the index of the first element in the array where predicate is true, and -1
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found,
@@ -1810,7 +1810,7 @@ interface Uint8Array {
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
* Returns the index of the first element in the array where predicate is true, and -1
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found,
@@ -2084,7 +2084,7 @@ interface Uint8ClampedArray {
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
* Returns the index of the first element in the array where predicate is true, and -1
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found,
@@ -2357,7 +2357,7 @@ interface Int16Array {
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
* Returns the index of the first element in the array where predicate is true, and -1
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found,
@@ -2631,7 +2631,7 @@ interface Uint16Array {
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
* Returns the index of the first element in the array where predicate is true, and -1
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found,
@@ -2904,7 +2904,7 @@ interface Int32Array {
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
* Returns the index of the first element in the array where predicate is true, and -1
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found,
@@ -3177,7 +3177,7 @@ interface Uint32Array {
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
* Returns the index of the first element in the array where predicate is true, and -1
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found,
@@ -3450,7 +3450,7 @@ interface Float32Array {
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
* Returns the index of the first element in the array where predicate is true, and -1
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found,
@@ -3724,7 +3724,7 @@ interface Float64Array {
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
* Returns the index of the first element in the array where predicate is true, and -1
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found,

View File

@@ -1597,6 +1597,7 @@ namespace ts.server {
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: true,
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: false,
InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: false,
InsertSpaceAfterTypeAssertion: false,
PlaceOpenBraceOnNewLineForFunctions: false,
PlaceOpenBraceOnNewLineForControlBlocks: false,
});

View File

@@ -138,7 +138,6 @@ namespace ts.formatting {
public NoSpaceAfterOpenAngularBracket: Rule;
public NoSpaceBeforeCloseAngularBracket: Rule;
public NoSpaceAfterCloseAngularBracket: Rule;
public NoSpaceAfterTypeAssertion: Rule;
// Remove spaces in empty interface literals. e.g.: x: {}
public NoSpaceBetweenEmptyInterfaceBraceBrackets: Rule;
@@ -240,6 +239,10 @@ namespace ts.formatting {
public NoSpaceBeforeEqualInJsxAttribute: Rule;
public NoSpaceAfterEqualInJsxAttribute: Rule;
// No space after type assertions
public NoSpaceAfterTypeAssertion: Rule;
public SpaceAfterTypeAssertion: Rule;
constructor() {
///
/// Common Rules
@@ -375,7 +378,6 @@ namespace ts.formatting {
this.NoSpaceAfterOpenAngularBracket = new Rule(RuleDescriptor.create3(SyntaxKind.LessThanToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), RuleAction.Delete));
this.NoSpaceBeforeCloseAngularBracket = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.GreaterThanToken), RuleOperation.create2(new RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), RuleAction.Delete));
this.NoSpaceAfterCloseAngularBracket = new Rule(RuleDescriptor.create3(SyntaxKind.GreaterThanToken, Shared.TokenRange.FromTokens([SyntaxKind.OpenParenToken, SyntaxKind.OpenBracketToken, SyntaxKind.GreaterThanToken, SyntaxKind.CommaToken])), RuleOperation.create2(new RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), RuleAction.Delete));
this.NoSpaceAfterTypeAssertion = new Rule(RuleDescriptor.create3(SyntaxKind.GreaterThanToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), RuleAction.Delete));
// Remove spaces in empty interface literals. e.g.: x: {}
this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new Rule(RuleDescriptor.create1(SyntaxKind.OpenBraceToken, SyntaxKind.CloseBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectTypeContext), RuleAction.Delete));
@@ -447,7 +449,6 @@ namespace ts.formatting {
this.NoSpaceAfterOpenAngularBracket,
this.NoSpaceBeforeCloseAngularBracket,
this.NoSpaceAfterCloseAngularBracket,
this.NoSpaceAfterTypeAssertion,
this.SpaceBeforeAt,
this.NoSpaceAfterAt,
this.SpaceAfterDecorator,
@@ -526,6 +527,11 @@ namespace ts.formatting {
// Insert space after function keyword for anonymous functions
this.SpaceAfterAnonymousFunctionKeyword = new Rule(RuleDescriptor.create1(SyntaxKind.FunctionKeyword, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext), RuleAction.Space));
this.NoSpaceAfterAnonymousFunctionKeyword = new Rule(RuleDescriptor.create1(SyntaxKind.FunctionKeyword, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext), RuleAction.Delete));
// No space after type assertion
this.NoSpaceAfterTypeAssertion = new Rule(RuleDescriptor.create3(SyntaxKind.GreaterThanToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), RuleAction.Delete));
this.SpaceAfterTypeAssertion = new Rule(RuleDescriptor.create3(SyntaxKind.GreaterThanToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), RuleAction.Space));
}
///

View File

@@ -137,9 +137,16 @@ namespace ts.formatting {
rules.push(this.globalRules.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock);
}
if (options.InsertSpaceAfterTypeAssertion) {
rules.push(this.globalRules.SpaceAfterTypeAssertion);
}
else {
rules.push(this.globalRules.NoSpaceAfterTypeAssertion);
}
rules = rules.concat(this.globalRules.LowPriorityCommonRules);
return rules;
}
}
}
}

View File

@@ -353,6 +353,7 @@ namespace ts {
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean;
InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
InsertSpaceAfterTypeAssertion?: boolean;
PlaceOpenBraceOnNewLineForFunctions: boolean;
PlaceOpenBraceOnNewLineForControlBlocks: boolean;
[s: string]: boolean | number | string | undefined;

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/aliasBug.ts(17,15): error TS2305: Module 'foo.bar.baz' has no exported member 'bar'.
tests/cases/compiler/aliasBug.ts(17,15): error TS2694: Namespace 'foo.bar.baz' has no exported member 'bar'.
==== tests/cases/compiler/aliasBug.ts (1 errors) ====
@@ -20,7 +20,7 @@ tests/cases/compiler/aliasBug.ts(17,15): error TS2305: Module 'foo.bar.baz' has
var p2: foo.Provide;
var p3:booz.bar;
~~~
!!! error TS2305: Module 'foo.bar.baz' has no exported member 'bar'.
!!! error TS2694: Namespace 'foo.bar.baz' has no exported member 'bar'.
var p22 = new provide.Provide();
}

View File

@@ -4,7 +4,7 @@ tests/cases/compiler/aliasErrors.ts(13,12): error TS1003: Identifier expected.
tests/cases/compiler/aliasErrors.ts(14,12): error TS1003: Identifier expected.
tests/cases/compiler/aliasErrors.ts(15,12): error TS1003: Identifier expected.
tests/cases/compiler/aliasErrors.ts(16,12): error TS2503: Cannot find namespace 'undefined'.
tests/cases/compiler/aliasErrors.ts(26,15): error TS2305: Module 'foo.bar.baz' has no exported member 'bar'.
tests/cases/compiler/aliasErrors.ts(26,15): error TS2694: Namespace 'foo.bar.baz' has no exported member 'bar'.
==== tests/cases/compiler/aliasErrors.ts (7 errors) ====
@@ -47,7 +47,7 @@ tests/cases/compiler/aliasErrors.ts(26,15): error TS2305: Module 'foo.bar.baz' h
var p2: foo.Provide;
var p3:booz.bar;
~~~
!!! error TS2305: Module 'foo.bar.baz' has no exported member 'bar'.
!!! error TS2694: Namespace 'foo.bar.baz' has no exported member 'bar'.
var p22 = new provide.Provide();
}

View File

@@ -1,10 +1,10 @@
tests/cases/compiler/bluebirdStaticThis.ts(5,15): error TS2420: Class 'Promise<R>' incorrectly implements interface 'Thenable<R>'.
Property 'then' is missing in type 'Promise<R>'.
tests/cases/compiler/bluebirdStaticThis.ts(22,51): error TS2305: Module 'Promise' has no exported member 'Resolver'.
tests/cases/compiler/bluebirdStaticThis.ts(57,109): error TS2305: Module 'Promise' has no exported member 'Inspection'.
tests/cases/compiler/bluebirdStaticThis.ts(58,91): error TS2305: Module 'Promise' has no exported member 'Inspection'.
tests/cases/compiler/bluebirdStaticThis.ts(59,91): error TS2305: Module 'Promise' has no exported member 'Inspection'.
tests/cases/compiler/bluebirdStaticThis.ts(60,73): error TS2305: Module 'Promise' has no exported member 'Inspection'.
tests/cases/compiler/bluebirdStaticThis.ts(22,51): error TS2694: Namespace 'Promise' has no exported member 'Resolver'.
tests/cases/compiler/bluebirdStaticThis.ts(57,109): error TS2694: Namespace 'Promise' has no exported member 'Inspection'.
tests/cases/compiler/bluebirdStaticThis.ts(58,91): error TS2694: Namespace 'Promise' has no exported member 'Inspection'.
tests/cases/compiler/bluebirdStaticThis.ts(59,91): error TS2694: Namespace 'Promise' has no exported member 'Inspection'.
tests/cases/compiler/bluebirdStaticThis.ts(60,73): error TS2694: Namespace 'Promise' has no exported member 'Inspection'.
==== tests/cases/compiler/bluebirdStaticThis.ts (6 errors) ====
@@ -34,7 +34,7 @@ tests/cases/compiler/bluebirdStaticThis.ts(60,73): error TS2305: Module 'Promise
static defer<R>(dit: typeof Promise): Promise.Resolver<R>;
~~~~~~~~
!!! error TS2305: Module 'Promise' has no exported member 'Resolver'.
!!! error TS2694: Namespace 'Promise' has no exported member 'Resolver'.
static cast<R>(dit: typeof Promise, value: Promise.Thenable<R>): Promise<R>;
static cast<R>(dit: typeof Promise, value: R): Promise<R>;
@@ -71,16 +71,16 @@ tests/cases/compiler/bluebirdStaticThis.ts(60,73): error TS2305: Module 'Promise
static settle<R>(dit: typeof Promise, values: Promise.Thenable<Promise.Thenable<R>[]>): Promise<Promise.Inspection<R>[]>;
~~~~~~~~~~
!!! error TS2305: Module 'Promise' has no exported member 'Inspection'.
!!! error TS2694: Namespace 'Promise' has no exported member 'Inspection'.
static settle<R>(dit: typeof Promise, values: Promise.Thenable<R[]>): Promise<Promise.Inspection<R>[]>;
~~~~~~~~~~
!!! error TS2305: Module 'Promise' has no exported member 'Inspection'.
!!! error TS2694: Namespace 'Promise' has no exported member 'Inspection'.
static settle<R>(dit: typeof Promise, values: Promise.Thenable<R>[]): Promise<Promise.Inspection<R>[]>;
~~~~~~~~~~
!!! error TS2305: Module 'Promise' has no exported member 'Inspection'.
!!! error TS2694: Namespace 'Promise' has no exported member 'Inspection'.
static settle<R>(dit: typeof Promise, values: R[]): Promise<Promise.Inspection<R>[]>;
~~~~~~~~~~
!!! error TS2305: Module 'Promise' has no exported member 'Inspection'.
!!! error TS2694: Namespace 'Promise' has no exported member 'Inspection'.
static any<R>(dit: typeof Promise, values: Promise.Thenable<Promise.Thenable<R>[]>): Promise<R>;
static any<R>(dit: typeof Promise, values: Promise.Thenable<R[]>): Promise<R>;

View File

@@ -2,7 +2,7 @@ tests/cases/compiler/callOnInstance.ts(1,18): error TS2300: Duplicate identifier
tests/cases/compiler/callOnInstance.ts(3,15): error TS2300: Duplicate identifier 'D'.
tests/cases/compiler/callOnInstance.ts(7,19): error TS2346: Supplied parameters do not match any signature of call target.
tests/cases/compiler/callOnInstance.ts(7,19): error TS2350: Only a void function can be called with the 'new' keyword.
tests/cases/compiler/callOnInstance.ts(10,1): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/compiler/callOnInstance.ts(10,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'C' has no compatible call signatures.
==== tests/cases/compiler/callOnInstance.ts (5 errors) ====
@@ -25,4 +25,4 @@ tests/cases/compiler/callOnInstance.ts(10,1): error TS2349: Cannot invoke an exp
declare class C { constructor(value: number); }
(new C(1))(); // Error for calling an instance
~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'C' has no compatible call signatures.

View File

@@ -1,7 +1,7 @@
tests/cases/compiler/complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters.
tests/cases/compiler/complicatedPrivacy.ts(35,5): error TS1170: A computed property name in a type literal must directly refer to a built-in symbol.
tests/cases/compiler/complicatedPrivacy.ts(35,6): error TS2304: Cannot find name 'number'.
tests/cases/compiler/complicatedPrivacy.ts(73,55): error TS2305: Module 'mglo5' has no exported member 'i6'.
tests/cases/compiler/complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported member 'i6'.
==== tests/cases/compiler/complicatedPrivacy.ts (4 errors) ====
@@ -85,7 +85,7 @@ tests/cases/compiler/complicatedPrivacy.ts(73,55): error TS2305: Module 'mglo5'
export class c_pr implements mglo5.i5, mglo5.i6 {
~~
!!! error TS2305: Module 'mglo5' has no exported member 'i6'.
!!! error TS2694: Namespace 'mglo5' has no exported member 'i6'.
f1() {
return "Hello";
}

View File

@@ -1,6 +1,6 @@
tests/cases/compiler/computedPropertiesInDestructuring1.ts(20,8): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/compiler/computedPropertiesInDestructuring1.ts(20,8): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
tests/cases/compiler/computedPropertiesInDestructuring1.ts(21,12): error TS2339: Property 'toExponential' does not exist on type 'string'.
tests/cases/compiler/computedPropertiesInDestructuring1.ts(33,4): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/compiler/computedPropertiesInDestructuring1.ts(33,4): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
tests/cases/compiler/computedPropertiesInDestructuring1.ts(34,5): error TS2365: Operator '+' cannot be applied to types '1' and '{}'.
@@ -26,7 +26,7 @@ tests/cases/compiler/computedPropertiesInDestructuring1.ts(34,5): error TS2365:
// report errors on type errors in computed properties used in destructuring
let [{[foo()]: bar6}] = [{bar: "bar"}];
~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
let [{[foo.toExponential()]: bar7}] = [{bar: "bar"}];
~~~~~~~~~~~~~
!!! error TS2339: Property 'toExponential' does not exist on type 'string'.
@@ -43,7 +43,7 @@ tests/cases/compiler/computedPropertiesInDestructuring1.ts(34,5): error TS2365:
[{[foo()]: bar4}] = [{bar: "bar"}];
~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
[{[(1 + {})]: bar4}] = [{bar: "bar"}];
~~~~~~
!!! error TS2365: Operator '+' cannot be applied to types '1' and '{}'.

View File

@@ -1,6 +1,6 @@
tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(21,8): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(21,8): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(22,12): error TS2339: Property 'toExponential' does not exist on type 'string'.
tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(34,4): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(34,4): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(35,5): error TS2365: Operator '+' cannot be applied to types '1' and '{}'.
@@ -27,7 +27,7 @@ tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(35,5): error TS23
// report errors on type errors in computed properties used in destructuring
let [{[foo()]: bar6}] = [{bar: "bar"}];
~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
let [{[foo.toExponential()]: bar7}] = [{bar: "bar"}];
~~~~~~~~~~~~~
!!! error TS2339: Property 'toExponential' does not exist on type 'string'.
@@ -44,7 +44,7 @@ tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(35,5): error TS23
[{[foo()]: bar4}] = [{bar: "bar"}];
~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
[{[(1 + {})]: bar4}] = [{bar: "bar"}];
~~~~~~
!!! error TS2365: Operator '+' cannot be applied to types '1' and '{}'.

View File

@@ -1,5 +1,5 @@
tests/cases/conformance/decorators/class/constructableDecoratorOnClass01.ts(4,1): error TS1238: Unable to resolve signature of class decorator when called as an expression.
Cannot invoke an expression whose type lacks a call signature.
Cannot invoke an expression whose type lacks a call signature. Type 'typeof CtorDtor' has no compatible call signatures.
==== tests/cases/conformance/decorators/class/constructableDecoratorOnClass01.ts (1 errors) ====
@@ -9,7 +9,7 @@ tests/cases/conformance/decorators/class/constructableDecoratorOnClass01.ts(4,1)
@CtorDtor
~~~~~~~~~
!!! error TS1238: Unable to resolve signature of class decorator when called as an expression.
!!! error TS1238: Cannot invoke an expression whose type lacks a call signature.
!!! error TS1238: Cannot invoke an expression whose type lacks a call signature. Type 'typeof CtorDtor' has no compatible call signatures.
class C {
}

View File

@@ -1,7 +1,7 @@
tests/cases/compiler/constructorOverloads4.ts(2,18): error TS2300: Duplicate identifier 'Function'.
tests/cases/compiler/constructorOverloads4.ts(5,21): error TS2300: Duplicate identifier 'Function'.
tests/cases/compiler/constructorOverloads4.ts(6,21): error TS2300: Duplicate identifier 'Function'.
tests/cases/compiler/constructorOverloads4.ts(10,1): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/compiler/constructorOverloads4.ts(10,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Function' has no compatible call signatures.
tests/cases/compiler/constructorOverloads4.ts(11,1): error TS2348: Value of type 'typeof Function' is not callable. Did you mean to include 'new'?
@@ -23,7 +23,7 @@ tests/cases/compiler/constructorOverloads4.ts(11,1): error TS2348: Value of type
(new M.Function("return 5"))();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Function' has no compatible call signatures.
M.Function("yo");
~~~~~~~~~~~~~~~~
!!! error TS2348: Value of type 'typeof Function' is not callable. Did you mean to include 'new'?

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/exportSpecifierReferencingOuterDeclaration3.ts(6,30): error TS2305: Module 'X' has no exported member 'bar'.
tests/cases/compiler/exportSpecifierReferencingOuterDeclaration3.ts(6,30): error TS2694: Namespace 'X' has no exported member 'bar'.
==== tests/cases/compiler/exportSpecifierReferencingOuterDeclaration3.ts (1 errors) ====
@@ -9,5 +9,5 @@ tests/cases/compiler/exportSpecifierReferencingOuterDeclaration3.ts(6,30): error
export function foo(): X.foo;
export function bar(): X.bar; // error
~~~
!!! error TS2305: Module 'X' has no exported member 'bar'.
!!! error TS2694: Namespace 'X' has no exported member 'bar'.
}

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/exportSpecifierReferencingOuterDeclaration2_B.ts(4,34): error TS2305: Module 'X' has no exported member 'bar'.
tests/cases/compiler/exportSpecifierReferencingOuterDeclaration2_B.ts(4,34): error TS2694: Namespace 'X' has no exported member 'bar'.
==== tests/cases/compiler/exportSpecifierReferencingOuterDeclaration2_A.ts (0 errors) ====
@@ -10,4 +10,4 @@ tests/cases/compiler/exportSpecifierReferencingOuterDeclaration2_B.ts(4,34): err
export declare function foo(): X.foo;
export declare function bar(): X.bar; // error
~~~
!!! error TS2305: Module 'X' has no exported member 'bar'.
!!! error TS2694: Namespace 'X' has no exported member 'bar'.

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/functionExpressionShadowedByParams.ts(3,4): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/compiler/functionExpressionShadowedByParams.ts(3,4): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Number' has no compatible call signatures.
tests/cases/compiler/functionExpressionShadowedByParams.ts(10,9): error TS2339: Property 'apply' does not exist on type 'number'.
@@ -7,7 +7,7 @@ tests/cases/compiler/functionExpressionShadowedByParams.ts(10,9): error TS2339:
b1.toPrecision(2); // should not error
b1(12); // should error
~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Number' has no compatible call signatures.
}

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/genericFunduleInModule.ts(8,10): error TS2305: Module 'A' has no exported member 'B'.
tests/cases/compiler/genericFunduleInModule.ts(8,10): error TS2694: Namespace 'A' has no exported member 'B'.
==== tests/cases/compiler/genericFunduleInModule.ts (1 errors) ====
@@ -11,5 +11,5 @@ tests/cases/compiler/genericFunduleInModule.ts(8,10): error TS2305: Module 'A' h
var b: A.B;
~
!!! error TS2305: Module 'A' has no exported member 'B'.
!!! error TS2694: Namespace 'A' has no exported member 'B'.
A.B(1);

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/genericFunduleInModule2.ts(11,10): error TS2305: Module 'A' has no exported member 'B'.
tests/cases/compiler/genericFunduleInModule2.ts(11,10): error TS2694: Namespace 'A' has no exported member 'B'.
==== tests/cases/compiler/genericFunduleInModule2.ts (1 errors) ====
@@ -14,5 +14,5 @@ tests/cases/compiler/genericFunduleInModule2.ts(11,10): error TS2305: Module 'A'
var b: A.B;
~
!!! error TS2305: Module 'A' has no exported member 'B'.
!!! error TS2694: Namespace 'A' has no exported member 'B'.
A.B(1);

View File

@@ -17,7 +17,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(23,21): error TS2314: Generic type 'I<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS2304: Cannot find name 'M'.
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(30,24): error TS2314: Generic type 'E<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(31,24): error TS2305: Module 'M' has no exported member 'C'.
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(31,24): error TS2694: Namespace 'M' has no exported member 'C'.
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(33,22): error TS2314: Generic type 'I<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(34,22): error TS2314: Generic type 'E<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS2304: Cannot find name 'C'.
@@ -95,7 +95,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc
!!! error TS2314: Generic type 'E<T>' requires 1 type argument(s).
interface I2 extends M.C { }
~
!!! error TS2305: Module 'M' has no exported member 'C'.
!!! error TS2694: Namespace 'M' has no exported member 'C'.
function h<T extends I>(x: T) { }
~

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/importAnImport.ts(6,23): error TS2305: Module 'c.a.b' has no exported member 'ma'.
tests/cases/compiler/importAnImport.ts(6,23): error TS2694: Namespace 'c.a.b' has no exported member 'ma'.
==== tests/cases/compiler/importAnImport.ts (1 errors) ====
@@ -9,5 +9,5 @@ tests/cases/compiler/importAnImport.ts(6,23): error TS2305: Module 'c.a.b' has n
module m0 {
import m8 = c.a.b.ma;
~~
!!! error TS2305: Module 'c.a.b' has no exported member 'ma'.
!!! error TS2694: Namespace 'c.a.b' has no exported member 'ma'.
}

View File

@@ -1,12 +1,12 @@
tests/cases/compiler/importDeclWithClassModifiers.ts(5,8): error TS1044: 'public' modifier cannot appear on a module or namespace element.
tests/cases/compiler/importDeclWithClassModifiers.ts(5,26): error TS2304: Cannot find name 'x'.
tests/cases/compiler/importDeclWithClassModifiers.ts(5,28): error TS2305: Module 'x' has no exported member 'c'.
tests/cases/compiler/importDeclWithClassModifiers.ts(5,28): error TS2694: Namespace 'x' has no exported member 'c'.
tests/cases/compiler/importDeclWithClassModifiers.ts(6,8): error TS1044: 'private' modifier cannot appear on a module or namespace element.
tests/cases/compiler/importDeclWithClassModifiers.ts(6,27): error TS2304: Cannot find name 'x'.
tests/cases/compiler/importDeclWithClassModifiers.ts(6,29): error TS2305: Module 'x' has no exported member 'c'.
tests/cases/compiler/importDeclWithClassModifiers.ts(6,29): error TS2694: Namespace 'x' has no exported member 'c'.
tests/cases/compiler/importDeclWithClassModifiers.ts(7,8): error TS1044: 'static' modifier cannot appear on a module or namespace element.
tests/cases/compiler/importDeclWithClassModifiers.ts(7,26): error TS2304: Cannot find name 'x'.
tests/cases/compiler/importDeclWithClassModifiers.ts(7,28): error TS2305: Module 'x' has no exported member 'c'.
tests/cases/compiler/importDeclWithClassModifiers.ts(7,28): error TS2694: Namespace 'x' has no exported member 'c'.
==== tests/cases/compiler/importDeclWithClassModifiers.ts (9 errors) ====
@@ -20,20 +20,20 @@ tests/cases/compiler/importDeclWithClassModifiers.ts(7,28): error TS2305: Module
~
!!! error TS2304: Cannot find name 'x'.
~
!!! error TS2305: Module 'x' has no exported member 'c'.
!!! error TS2694: Namespace 'x' has no exported member 'c'.
export private import b = x.c;
~~~~~~~
!!! error TS1044: 'private' modifier cannot appear on a module or namespace element.
~
!!! error TS2304: Cannot find name 'x'.
~
!!! error TS2305: Module 'x' has no exported member 'c'.
!!! error TS2694: Namespace 'x' has no exported member 'c'.
export static import c = x.c;
~~~~~~
!!! error TS1044: 'static' modifier cannot appear on a module or namespace element.
~
!!! error TS2304: Cannot find name 'x'.
~
!!! error TS2305: Module 'x' has no exported member 'c'.
!!! error TS2694: Namespace 'x' has no exported member 'c'.
var b: a;

View File

@@ -1,6 +1,6 @@
tests/cases/compiler/importDeclWithDeclareModifier.ts(5,9): error TS1029: 'export' modifier must precede 'declare' modifier.
tests/cases/compiler/importDeclWithDeclareModifier.ts(5,27): error TS2304: Cannot find name 'x'.
tests/cases/compiler/importDeclWithDeclareModifier.ts(5,29): error TS2305: Module 'x' has no exported member 'c'.
tests/cases/compiler/importDeclWithDeclareModifier.ts(5,29): error TS2694: Namespace 'x' has no exported member 'c'.
==== tests/cases/compiler/importDeclWithDeclareModifier.ts (3 errors) ====
@@ -14,6 +14,6 @@ tests/cases/compiler/importDeclWithDeclareModifier.ts(5,29): error TS2305: Modul
~
!!! error TS2304: Cannot find name 'x'.
~
!!! error TS2305: Module 'x' has no exported member 'c'.
!!! error TS2694: Namespace 'x' has no exported member 'c'.
var b: a;

View File

@@ -1,5 +1,5 @@
tests/cases/compiler/importDeclWithExportModifier.ts(5,19): error TS2304: Cannot find name 'x'.
tests/cases/compiler/importDeclWithExportModifier.ts(5,21): error TS2305: Module 'x' has no exported member 'c'.
tests/cases/compiler/importDeclWithExportModifier.ts(5,21): error TS2694: Namespace 'x' has no exported member 'c'.
==== tests/cases/compiler/importDeclWithExportModifier.ts (2 errors) ====
@@ -11,6 +11,6 @@ tests/cases/compiler/importDeclWithExportModifier.ts(5,21): error TS2305: Module
~
!!! error TS2304: Cannot find name 'x'.
~
!!! error TS2305: Module 'x' has no exported member 'c'.
!!! error TS2694: Namespace 'x' has no exported member 'c'.
var b: a;

View File

@@ -1,5 +1,5 @@
tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts(5,19): error TS2304: Cannot find name 'x'.
tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts(5,21): error TS2305: Module 'x' has no exported member 'c'.
tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts(5,21): error TS2694: Namespace 'x' has no exported member 'c'.
tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts(6,1): error TS2309: An export assignment cannot be used in a module with other exported elements.
@@ -12,7 +12,7 @@ tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts(6,1): er
~
!!! error TS2304: Cannot find name 'x'.
~
!!! error TS2305: Module 'x' has no exported member 'c'.
!!! error TS2694: Namespace 'x' has no exported member 'c'.
export = x;
~~~~~~~~~~~
!!! error TS2309: An export assignment cannot be used in a module with other exported elements.

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/innerAliases.ts(19,10): error TS2305: Module 'D' has no exported member 'inner'.
tests/cases/compiler/innerAliases.ts(19,10): error TS2694: Namespace 'D' has no exported member 'inner'.
tests/cases/compiler/innerAliases.ts(21,11): error TS2339: Property 'inner' does not exist on type 'typeof D'.
@@ -23,7 +23,7 @@ tests/cases/compiler/innerAliases.ts(21,11): error TS2339: Property 'inner' does
var c: D.inner.Class1;
~~~~~
!!! error TS2305: Module 'D' has no exported member 'inner'.
!!! error TS2694: Namespace 'D' has no exported member 'inner'.
c = new D.inner.Class1();
~~~~~

View File

@@ -1,9 +1,9 @@
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(7,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(19,14): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(19,14): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Number' has no compatible call signatures.
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(26,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(29,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(41,14): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(41,14): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
==== tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts (6 errors) ====
@@ -31,7 +31,7 @@ tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIn
r.y = 4;
var r6 = d.y(); // error
~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Number' has no compatible call signatures.
}
@@ -59,5 +59,5 @@ tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIn
r.y = '';
var r6 = d.y(); // error
~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
}

View File

@@ -1,9 +1,9 @@
tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(7,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(17,14): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(17,14): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Number' has no compatible call signatures.
tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(24,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(27,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(37,14): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(37,14): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
==== tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts (6 errors) ====
@@ -29,7 +29,7 @@ tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.t
r.y = 4;
var r6 = c.y(); // error
~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Number' has no compatible call signatures.
}
@@ -55,5 +55,5 @@ tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.t
r.y = '';
var r6 = c.y(); // error
~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
}

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.ts(11,10): error TS2305: Module '"tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'.
tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.ts(11,10): error TS2694: Namespace '"tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'.
==== tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.ts (1 errors) ====
@@ -14,4 +14,4 @@ tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessE
var x: c.b;
~
!!! error TS2305: Module '"tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'.
!!! error TS2694: Namespace '"tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'.

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.ts(16,17): error TS2305: Module '"tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'.
tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.ts(16,17): error TS2694: Namespace '"tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'.
==== tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.ts (1 errors) ====
@@ -19,4 +19,4 @@ tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExp
export var z: c.b.I;
~
!!! error TS2305: Module '"tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'.
!!! error TS2694: Namespace '"tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'.

View File

@@ -0,0 +1,28 @@
//// [literalTypesAndTypeAssertions.ts]
const obj = {
a: "foo" as "foo",
b: <"foo">"foo",
c: "foo"
};
let x1 = 1 as (0 | 1);
let x2 = 1;
let { a = "foo" } = { a: "foo" };
let { b = "foo" as "foo" } = { b: "bar" };
let { c = "foo" } = { c: "bar" as "bar" };
let { d = "foo" as "foo" } = { d: "bar" as "bar" };
//// [literalTypesAndTypeAssertions.js]
var obj = {
a: "foo",
b: "foo",
c: "foo"
};
var x1 = 1;
var x2 = 1;
var _a = { a: "foo" }.a, a = _a === void 0 ? "foo" : _a;
var _b = { b: "bar" }.b, b = _b === void 0 ? "foo" : _b;
var _c = { c: "bar" }.c, c = _c === void 0 ? "foo" : _c;
var _d = { d: "bar" }.d, d = _d === void 0 ? "foo" : _d;

View File

@@ -0,0 +1,37 @@
=== tests/cases/conformance/types/literal/literalTypesAndTypeAssertions.ts ===
const obj = {
>obj : Symbol(obj, Decl(literalTypesAndTypeAssertions.ts, 0, 5))
a: "foo" as "foo",
>a : Symbol(a, Decl(literalTypesAndTypeAssertions.ts, 0, 13))
b: <"foo">"foo",
>b : Symbol(b, Decl(literalTypesAndTypeAssertions.ts, 1, 22))
c: "foo"
>c : Symbol(c, Decl(literalTypesAndTypeAssertions.ts, 2, 20))
};
let x1 = 1 as (0 | 1);
>x1 : Symbol(x1, Decl(literalTypesAndTypeAssertions.ts, 6, 3))
let x2 = 1;
>x2 : Symbol(x2, Decl(literalTypesAndTypeAssertions.ts, 7, 3))
let { a = "foo" } = { a: "foo" };
>a : Symbol(a, Decl(literalTypesAndTypeAssertions.ts, 9, 5))
>a : Symbol(a, Decl(literalTypesAndTypeAssertions.ts, 9, 21))
let { b = "foo" as "foo" } = { b: "bar" };
>b : Symbol(b, Decl(literalTypesAndTypeAssertions.ts, 10, 5))
>b : Symbol(b, Decl(literalTypesAndTypeAssertions.ts, 10, 30))
let { c = "foo" } = { c: "bar" as "bar" };
>c : Symbol(c, Decl(literalTypesAndTypeAssertions.ts, 11, 5))
>c : Symbol(c, Decl(literalTypesAndTypeAssertions.ts, 11, 21))
let { d = "foo" as "foo" } = { d: "bar" as "bar" };
>d : Symbol(d, Decl(literalTypesAndTypeAssertions.ts, 12, 5))
>d : Symbol(d, Decl(literalTypesAndTypeAssertions.ts, 12, 30))

View File

@@ -0,0 +1,62 @@
=== tests/cases/conformance/types/literal/literalTypesAndTypeAssertions.ts ===
const obj = {
>obj : { a: "foo"; b: "foo"; c: string; }
>{ a: "foo" as "foo", b: <"foo">"foo", c: "foo"} : { a: "foo"; b: "foo"; c: string; }
a: "foo" as "foo",
>a : "foo"
>"foo" as "foo" : "foo"
>"foo" : "foo"
b: <"foo">"foo",
>b : "foo"
><"foo">"foo" : "foo"
>"foo" : "foo"
c: "foo"
>c : string
>"foo" : "foo"
};
let x1 = 1 as (0 | 1);
>x1 : 0 | 1
>1 as (0 | 1) : 0 | 1
>1 : 1
let x2 = 1;
>x2 : number
>1 : 1
let { a = "foo" } = { a: "foo" };
>a : string
>"foo" : "foo"
>{ a: "foo" } : { a?: string; }
>a : string
>"foo" : "foo"
let { b = "foo" as "foo" } = { b: "bar" };
>b : "foo" | "bar"
>"foo" as "foo" : "foo"
>"foo" : "foo"
>{ b: "bar" } : { b?: "bar"; }
>b : string
>"bar" : "bar"
let { c = "foo" } = { c: "bar" as "bar" };
>c : "foo" | "bar"
>"foo" : "foo"
>{ c: "bar" as "bar" } : { c?: "bar"; }
>c : "bar"
>"bar" as "bar" : "bar"
>"bar" : "bar"
let { d = "foo" as "foo" } = { d: "bar" as "bar" };
>d : "foo" | "bar"
>"foo" as "foo" : "foo"
>"foo" : "foo"
>{ d: "bar" as "bar" } : { d?: "bar"; }
>d : "bar"
>"bar" as "bar" : "bar"
>"bar" : "bar"

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/moduleClassArrayCodeGenTest.ts(10,11): error TS2305: Module 'M' has no exported member 'B'.
tests/cases/compiler/moduleClassArrayCodeGenTest.ts(10,11): error TS2694: Namespace 'M' has no exported member 'B'.
==== tests/cases/compiler/moduleClassArrayCodeGenTest.ts (1 errors) ====
@@ -13,4 +13,4 @@ tests/cases/compiler/moduleClassArrayCodeGenTest.ts(10,11): error TS2305: Module
var t: M.A[] = [];
var t2: M.B[] = [];
~
!!! error TS2305: Module 'M' has no exported member 'B'.
!!! error TS2694: Namespace 'M' has no exported member 'B'.

View File

@@ -1,14 +1,14 @@
tests/cases/compiler/moduleImport.ts(2,17): error TS2305: Module 'X' has no exported member 'Y'.
tests/cases/compiler/moduleImport.ts(2,17): error TS2339: Property 'Y' does not exist on type 'typeof X'.
tests/cases/compiler/moduleImport.ts(2,17): error TS2694: Namespace 'X' has no exported member 'Y'.
==== tests/cases/compiler/moduleImport.ts (2 errors) ====
module A.B.C {
import XYZ = X.Y.Z;
~
!!! error TS2305: Module 'X' has no exported member 'Y'.
~
!!! error TS2339: Property 'Y' does not exist on type 'typeof X'.
~
!!! error TS2694: Namespace 'X' has no exported member 'Y'.
export function ping(x: number) {
if (x>0) XYZ.pong (x-1);
}

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/moduleNewExportBug.ts(10,14): error TS2305: Module 'mod1' has no exported member 'C'.
tests/cases/compiler/moduleNewExportBug.ts(10,14): error TS2694: Namespace 'mod1' has no exported member 'C'.
==== tests/cases/compiler/moduleNewExportBug.ts (1 errors) ====
@@ -13,7 +13,7 @@ tests/cases/compiler/moduleNewExportBug.ts(10,14): error TS2305: Module 'mod1' h
var c : mod1.C; // ERROR: C should not be visible
~
!!! error TS2305: Module 'mod1' has no exported member 'C'.
!!! error TS2694: Namespace 'mod1' has no exported member 'C'.

View File

@@ -1,7 +1,7 @@
tests/cases/compiler/moduleVisibilityTest2.ts(57,17): error TS2304: Cannot find name 'x'.
tests/cases/compiler/moduleVisibilityTest2.ts(58,21): error TS2339: Property 'E' does not exist on type 'typeof M'.
tests/cases/compiler/moduleVisibilityTest2.ts(61,16): error TS2305: Module 'M' has no exported member 'I'.
tests/cases/compiler/moduleVisibilityTest2.ts(61,23): error TS2305: Module 'M' has no exported member 'I'.
tests/cases/compiler/moduleVisibilityTest2.ts(61,16): error TS2694: Namespace 'M' has no exported member 'I'.
tests/cases/compiler/moduleVisibilityTest2.ts(61,23): error TS2694: Namespace 'M' has no exported member 'I'.
tests/cases/compiler/moduleVisibilityTest2.ts(64,11): error TS2339: Property 'x' does not exist on type 'typeof M'.
tests/cases/compiler/moduleVisibilityTest2.ts(65,15): error TS2339: Property 'E' does not exist on type 'typeof M'.
@@ -73,9 +73,9 @@ tests/cases/compiler/moduleVisibilityTest2.ts(65,15): error TS2339: Property 'E'
var cprime : M.I = <M.I>null;
~
!!! error TS2305: Module 'M' has no exported member 'I'.
!!! error TS2694: Namespace 'M' has no exported member 'I'.
~
!!! error TS2305: Module 'M' has no exported member 'I'.
!!! error TS2694: Namespace 'M' has no exported member 'I'.
var c = new M.C();
var z = M.x;

View File

@@ -1,6 +1,6 @@
tests/cases/compiler/moduleVisibilityTest3.ts(20,22): error TS2304: Cannot find name 'modes'.
tests/cases/compiler/moduleVisibilityTest3.ts(20,39): error TS2305: Module '_modes' has no exported member 'Mode'.
tests/cases/compiler/moduleVisibilityTest3.ts(21,22): error TS2305: Module '_modes' has no exported member 'Mode'.
tests/cases/compiler/moduleVisibilityTest3.ts(20,39): error TS2694: Namespace '_modes' has no exported member 'Mode'.
tests/cases/compiler/moduleVisibilityTest3.ts(21,22): error TS2694: Namespace '_modes' has no exported member 'Mode'.
==== tests/cases/compiler/moduleVisibilityTest3.ts (3 errors) ====
@@ -27,10 +27,10 @@ tests/cases/compiler/moduleVisibilityTest3.ts(21,22): error TS2305: Module '_mod
~~~~~
!!! error TS2304: Cannot find name 'modes'.
~~~~
!!! error TS2305: Module '_modes' has no exported member 'Mode'.
!!! error TS2694: Namespace '_modes' has no exported member 'Mode'.
var x:modes.Mode;
~~~~
!!! error TS2305: Module '_modes' has no exported member 'Mode'.
!!! error TS2694: Namespace '_modes' has no exported member 'Mode'.
}
}

View File

@@ -0,0 +1,22 @@
//// [namespacesDeclaration1.ts]
module M {
export namespace N {
export module M2 {
export interface I {}
}
}
}
//// [namespacesDeclaration1.js]
//// [namespacesDeclaration1.d.ts]
declare module M {
namespace N {
module M2 {
interface I {
}
}
}
}

View File

@@ -0,0 +1,16 @@
=== tests/cases/compiler/namespacesDeclaration1.ts ===
module M {
>M : Symbol(M, Decl(namespacesDeclaration1.ts, 0, 0))
export namespace N {
>N : Symbol(N, Decl(namespacesDeclaration1.ts, 1, 10))
export module M2 {
>M2 : Symbol(M2, Decl(namespacesDeclaration1.ts, 2, 23))
export interface I {}
>I : Symbol(I, Decl(namespacesDeclaration1.ts, 3, 24))
}
}
}

View File

@@ -0,0 +1,16 @@
=== tests/cases/compiler/namespacesDeclaration1.ts ===
module M {
>M : any
export namespace N {
>N : any
export module M2 {
>M2 : any
export interface I {}
>I : I
}
}
}

View File

@@ -0,0 +1,27 @@
tests/cases/compiler/namespacesDeclaration2.ts(13,13): error TS2694: Namespace 'N' has no exported member 'S'.
tests/cases/compiler/namespacesDeclaration2.ts(14,12): error TS2694: Namespace 'M' has no exported member 'F'.
tests/cases/compiler/namespacesDeclaration2.ts(15,11): error TS2694: Namespace 'ns' has no exported member 'A'.
==== tests/cases/compiler/namespacesDeclaration2.ts (3 errors) ====
namespace N {
function S() {}
}
module M {
function F() {}
}
declare namespace ns {
let f: number;
}
var foge: N.S;
~
!!! error TS2694: Namespace 'N' has no exported member 'S'.
var foo: M.F;
~
!!! error TS2694: Namespace 'M' has no exported member 'F'.
let x: ns.A;
~
!!! error TS2694: Namespace 'ns' has no exported member 'A'.

View File

@@ -0,0 +1,42 @@
//// [namespacesDeclaration2.ts]
namespace N {
function S() {}
}
module M {
function F() {}
}
declare namespace ns {
let f: number;
}
var foge: N.S;
var foo: M.F;
let x: ns.A;
//// [namespacesDeclaration2.js]
var N;
(function (N) {
function S() { }
})(N || (N = {}));
var M;
(function (M) {
function F() { }
})(M || (M = {}));
var foge;
var foo;
var x;
//// [namespacesDeclaration2.d.ts]
declare namespace N {
}
declare module M {
}
declare namespace ns {
let f: number;
}
declare var foge: N.S;
declare var foo: M.F;
declare let x: ns.A;

View File

@@ -1,5 +1,5 @@
tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(22,7): error TS2339: Property 'method' does not exist on type '{}'.
tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(23,5): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(23,5): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.
tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(28,7): error TS2339: Property 'mesage' does not exist on type 'Error'.
tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error TS2339: Property 'getHuors' does not exist on type 'Date'.
@@ -31,7 +31,7 @@ tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error
!!! error TS2339: Property 'method' does not exist on type '{}'.
x();
~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.
}
if (isError(x)) {

View File

@@ -1,30 +1,30 @@
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(4,1): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/typescript.ts' not found.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(24,33): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(38,34): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(48,37): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(68,39): error TS2305: Module 'TypeScript' has no exported member 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(24,33): error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(38,34): error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(48,37): error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(68,39): error TS2694: Namespace 'TypeScript' has no exported member 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(70,35): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(75,32): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(79,32): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(86,47): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(75,32): error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(79,32): error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(86,47): error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(94,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(95,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(96,31): error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(96,31): error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(103,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(104,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(105,31): error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(105,31): error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(112,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(113,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(114,31): error TS2305: Module 'TypeScript' has no exported member 'ArgDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(114,31): error TS2694: Namespace 'TypeScript' has no exported member 'ArgDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(121,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(122,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(123,31): error TS2305: Module 'TypeScript' has no exported member 'VarDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(123,31): error TS2694: Namespace 'TypeScript' has no exported member 'VarDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(130,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(131,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(132,31): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(132,31): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(139,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(140,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(141,31): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(141,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(148,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(149,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(156,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
@@ -35,128 +35,128 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(172,65): error
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(173,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(174,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(175,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(176,31): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(177,31): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(178,31): error TS2305: Module 'TypeScript' has no exported member 'ClassDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(176,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(177,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(178,31): error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(185,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(186,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(191,61): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(192,28): error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(192,49): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(192,49): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(192,109): error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(197,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(198,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(199,31): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(199,31): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(200,28): error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(200,49): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(200,49): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(200,113): error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(205,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(206,31): error TS2305: Module 'TypeScript' has no exported member 'Script'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(206,31): error TS2694: Namespace 'TypeScript' has no exported member 'Script'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(211,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(212,31): error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(212,31): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(217,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(218,31): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(218,31): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(223,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(224,31): error TS2305: Module 'TypeScript' has no exported member 'ClassDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(224,31): error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(229,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(230,31): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(230,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(235,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(236,31): error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(236,31): error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(241,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(242,30): error TS2305: Module 'TypeScript' has no exported member 'Block'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(242,30): error TS2694: Namespace 'TypeScript' has no exported member 'Block'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(247,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(248,30): error TS2305: Module 'TypeScript' has no exported member 'ForStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(248,30): error TS2694: Namespace 'TypeScript' has no exported member 'ForStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(253,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(254,30): error TS2305: Module 'TypeScript' has no exported member 'CaseStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(254,30): error TS2694: Namespace 'TypeScript' has no exported member 'CaseStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(259,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(260,30): error TS2305: Module 'TypeScript' has no exported member 'Try'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(260,30): error TS2694: Namespace 'TypeScript' has no exported member 'Try'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(265,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(266,30): error TS2305: Module 'TypeScript' has no exported member 'Catch'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(266,30): error TS2694: Namespace 'TypeScript' has no exported member 'Catch'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(271,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(272,30): error TS2305: Module 'TypeScript' has no exported member 'DoWhileStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(272,30): error TS2694: Namespace 'TypeScript' has no exported member 'DoWhileStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(277,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(278,30): error TS2305: Module 'TypeScript' has no exported member 'WhileStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(278,30): error TS2694: Namespace 'TypeScript' has no exported member 'WhileStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(283,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(284,30): error TS2305: Module 'TypeScript' has no exported member 'ForInStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(284,30): error TS2694: Namespace 'TypeScript' has no exported member 'ForInStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(289,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(290,30): error TS2305: Module 'TypeScript' has no exported member 'WithStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(290,30): error TS2694: Namespace 'TypeScript' has no exported member 'WithStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(295,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(296,30): error TS2305: Module 'TypeScript' has no exported member 'Finally'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(296,30): error TS2694: Namespace 'TypeScript' has no exported member 'Finally'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(301,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(302,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(303,30): error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(303,30): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(308,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(309,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(310,30): error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(311,30): error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(310,30): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(311,30): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(316,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(317,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(318,30): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(318,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(327,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(328,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(329,30): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(330,30): error TS2305: Module 'TypeScript' has no exported member 'ASTList'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(329,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(330,30): error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(335,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(336,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(337,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(338,30): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(338,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(343,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(344,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(345,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(346,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(347,30): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(347,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(352,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(353,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(354,30): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(354,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(359,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(360,30): error TS2305: Module 'TypeScript' has no exported member 'BinaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(360,30): error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(365,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(366,30): error TS2305: Module 'TypeScript' has no exported member 'BinaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(366,30): error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(371,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(377,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(378,30): error TS2305: Module 'TypeScript' has no exported member 'IfStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(378,30): error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(383,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(384,30): error TS2305: Module 'TypeScript' has no exported member 'IfStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(384,30): error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(393,61): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(394,30): error TS2305: Module 'TypeScript' has no exported member 'ASTList'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(394,30): error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(399,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(400,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(401,30): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(401,30): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(406,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(407,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(408,30): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(408,30): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(413,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(414,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(415,30): error TS2305: Module 'TypeScript' has no exported member 'CallExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(415,30): error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(420,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(421,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(422,30): error TS2305: Module 'TypeScript' has no exported member 'CallExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(422,30): error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(427,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(428,30): error TS2305: Module 'TypeScript' has no exported member 'Block'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(432,52): error TS2305: Module 'TypeScript' has no exported member 'ASTSpan'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(462,61): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(463,52): error TS2305: Module 'TypeScript' has no exported member 'Comment'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(478,45): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(478,69): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(428,30): error TS2694: Namespace 'TypeScript' has no exported member 'Block'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(432,52): error TS2694: Namespace 'TypeScript' has no exported member 'ASTSpan'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(462,61): error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(463,52): error TS2694: Namespace 'TypeScript' has no exported member 'Comment'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(478,45): error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(478,69): error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(478,82): error TS2304: Cannot find name 'IAstWalker'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(489,21): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(490,49): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(516,22): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(525,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(533,62): error TS2305: Module 'TypeScript' has no exported member 'Script'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,36): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,60): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,84): error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,108): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(533,62): error TS2694: Namespace 'TypeScript' has no exported member 'Script'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,36): error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,60): error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,84): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,108): error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(551,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(558,45): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(558,95): error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(559,45): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(559,69): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(559,93): error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(565,46): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(565,70): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(565,94): error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(558,45): error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(558,95): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(559,45): error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(559,69): error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(559,93): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(565,46): error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(565,70): error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(565,94): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'.
@@ -188,7 +188,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
export class AstPath {
public asts: TypeScript.AST[] = [];
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
public top: number = -1;
static reverseIndexOf(items: any[], index: number): any {
@@ -204,7 +204,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
public pop(): TypeScript.AST {
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
var head = this.ast();
this.up();
@@ -216,7 +216,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
public push(ast: TypeScript.AST) {
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
while (this.asts.length > this.count()) {
this.asts.pop();
}
@@ -238,7 +238,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
public nodeType(): TypeScript.NodeType {
~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'NodeType'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'NodeType'.
if (this.ast() == null)
return TypeScript.NodeType.None;
~~~~~~~~
@@ -249,13 +249,13 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
public ast() {
return <TypeScript.AST>AstPath.reverseIndexOf(this.asts, this.asts.length - (this.top + 1));
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
}
public parent() {
return <TypeScript.AST>AstPath.reverseIndexOf(this.asts, this.asts.length - this.top);
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
}
public count() {
@@ -264,7 +264,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
public get(index: number): TypeScript.AST {
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
return this.asts[index];
}
@@ -280,7 +280,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
((<TypeScript.InterfaceDeclaration>this.parent()).name === this.ast());
~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'.
}
public isNameOfInterface(): boolean {
@@ -295,7 +295,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
((<TypeScript.InterfaceDeclaration>this.parent()).name === this.ast());
~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'.
}
public isNameOfArgument(): boolean {
@@ -310,7 +310,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
((<TypeScript.ArgDecl>this.parent()).id === this.ast());
~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ArgDecl'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'ArgDecl'.
}
public isNameOfVariable(): boolean {
@@ -325,7 +325,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
((<TypeScript.VarDecl>this.parent()).id === this.ast());
~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'VarDecl'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'VarDecl'.
}
public isNameOfModule(): boolean {
@@ -340,7 +340,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
((<TypeScript.ModuleDeclaration>this.parent()).name === this.ast());
~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'.
}
public isNameOfFunction(): boolean {
@@ -355,7 +355,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
((<TypeScript.FuncDecl>this.parent()).name === this.ast());
~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'.
}
public isChildOfScript(): boolean {
@@ -412,13 +412,13 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
((<TypeScript.FuncDecl>this.asts[this.top - 2]).isConstructor) &&
~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'.
((<TypeScript.FuncDecl>this.asts[this.top - 2]).arguments === this.asts[this.top - 1]) &&
~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'.
((<TypeScript.ClassDeclaration>this.asts[this.top - 4]).constructorDecl === this.asts[this.top - 2]);
~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ClassDeclaration'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'.
}
public isChildOfInterface(): boolean {
@@ -442,7 +442,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
~~~~~~~
!!! error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'.
~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'.
~~~~~~~~~~~
!!! error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'.
}
@@ -457,12 +457,12 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.ModuleDeclaration>this.asts[this.top - 1]).members == this.asts[this.top - 0] &&
~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'.
TypeScript.hasFlag((<TypeScript.ModuleDeclaration>this.asts[this.top - 1]).modFlags, TypeScript.ModuleFlags.IsWholeFile);
~~~~~~~
!!! error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'.
~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'.
~~~~~~~~~~~
!!! error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'.
}
@@ -474,7 +474,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.Script>this.asts[this.top - 1]).bod == this.asts[this.top - 0];
~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'Script'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'Script'.
}
public isBodyOfSwitch(): boolean {
@@ -484,7 +484,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.SwitchStatement>this.asts[this.top - 1]).caseList == this.asts[this.top - 0];
~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'.
}
public isBodyOfModule(): boolean {
@@ -494,7 +494,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.ModuleDeclaration>this.asts[this.top - 1]).members == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'.
}
public isBodyOfClass(): boolean {
@@ -504,7 +504,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.ClassDeclaration>this.asts[this.top - 1]).members == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ClassDeclaration'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'.
}
public isBodyOfFunction(): boolean {
@@ -514,7 +514,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.FuncDecl>this.asts[this.top - 1]).bod == this.asts[this.top - 0];
~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'.
}
public isBodyOfInterface(): boolean {
@@ -524,7 +524,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.InterfaceDeclaration>this.asts[this.top - 1]).members == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'.
}
public isBodyOfBlock(): boolean {
@@ -534,7 +534,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.Block>this.asts[this.top - 1]).statements == this.asts[this.top - 0];
~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'Block'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'Block'.
}
public isBodyOfFor(): boolean {
@@ -544,7 +544,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.ForStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ForStatement'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'ForStatement'.
}
public isBodyOfCase(): boolean {
@@ -554,7 +554,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.CaseStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'CaseStatement'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'CaseStatement'.
}
public isBodyOfTry(): boolean {
@@ -564,7 +564,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.Try>this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'Try'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'Try'.
}
public isBodyOfCatch(): boolean {
@@ -574,7 +574,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.Catch>this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'Catch'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'Catch'.
}
public isBodyOfDoWhile(): boolean {
@@ -584,7 +584,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.DoWhileStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'DoWhileStatement'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'DoWhileStatement'.
}
public isBodyOfWhile(): boolean {
@@ -594,7 +594,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.WhileStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'WhileStatement'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'WhileStatement'.
}
public isBodyOfForIn(): boolean {
@@ -604,7 +604,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.ForInStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ForInStatement'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'ForInStatement'.
}
public isBodyOfWith(): boolean {
@@ -614,7 +614,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.WithStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'WithStatement'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'WithStatement'.
}
public isBodyOfFinally(): boolean {
@@ -624,7 +624,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.Finally>this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'Finally'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'Finally'.
}
public isCaseOfSwitch(): boolean {
@@ -637,7 +637,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.SwitchStatement>this.asts[this.top - 2]).caseList == this.asts[this.top - 1];
~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'.
}
public isDefaultCaseOfSwitch(): boolean {
@@ -650,10 +650,10 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.SwitchStatement>this.asts[this.top - 2]).caseList == this.asts[this.top - 1] &&
~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'.
(<TypeScript.SwitchStatement>this.asts[this.top - 2]).defaultCase == this.asts[this.top - 0];
~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'.
}
public isListOfObjectLit(): boolean {
@@ -666,7 +666,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.UnaryExpression>this.asts[this.top - 1]).operand == this.asts[this.top - 0];
~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'.
}
public isBodyOfObjectLit(): boolean {
@@ -683,10 +683,10 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.UnaryExpression>this.asts[this.top - 1]).operand == this.asts[this.top - 0] &&
~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'.
(<TypeScript.ASTList>this.asts[this.top - 0]).members.length == 0;
~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ASTList'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'.
}
public isMemberOfObjectLit(): boolean {
@@ -702,7 +702,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.UnaryExpression>this.asts[this.top - 2]).operand == this.asts[this.top - 1];
~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'.
}
public isNameOfMemberOfObjectLit(): boolean {
@@ -721,7 +721,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.UnaryExpression>this.asts[this.top - 3]).operand == this.asts[this.top - 2];
~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'.
}
public isListOfArrayLit(): boolean {
@@ -734,7 +734,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.UnaryExpression>this.asts[this.top - 1]).operand == this.asts[this.top - 0];
~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'.
}
public isTargetOfMember(): boolean {
@@ -744,7 +744,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.BinaryExpression>this.asts[this.top - 1]).operand1 === this.asts[this.top - 0];
~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'BinaryExpression'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'.
}
public isMemberOfMember(): boolean {
@@ -754,7 +754,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.BinaryExpression>this.asts[this.top - 1]).operand2 === this.asts[this.top - 0];
~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'BinaryExpression'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'.
}
public isItemOfList(): boolean {
@@ -772,7 +772,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.IfStatement>this.asts[this.top - 1]).thenBod == this.asts[this.top - 0];
~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'IfStatement'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'.
}
public isElseOfIf(): boolean {
@@ -782,7 +782,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.IfStatement>this.asts[this.top - 1]).elseBod == this.asts[this.top - 0];
~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'IfStatement'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'.
}
public isBodyOfDefaultCase(): boolean {
@@ -796,7 +796,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.ASTList>this.asts[this.top]).members.length === 1;
~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ASTList'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'.
}
public isArgumentListOfFunction(): boolean {
@@ -809,7 +809,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.FuncDecl>this.asts[this.top - 1]).arguments === this.asts[this.top - 0];
~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'.
}
public isArgumentOfFunction(): boolean {
@@ -822,7 +822,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.FuncDecl>this.asts[this.top - 2]).arguments === this.asts[this.top - 1];
~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'.
}
public isArgumentListOfCall(): boolean {
@@ -835,7 +835,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.CallExpression>this.asts[this.top - 1]).arguments === this.asts[this.top - 0];
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'CallExpression'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'.
}
public isArgumentListOfNew(): boolean {
@@ -848,7 +848,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.CallExpression>this.asts[this.top - 1]).arguments === this.asts[this.top - 0];
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'CallExpression'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'.
}
public isSynthesizedBlock(): boolean {
@@ -858,13 +858,13 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(<TypeScript.Block>this.asts[this.top - 0]).isStatementBlock === false;
~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'Block'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'Block'.
}
}
export function isValidAstNode(ast: TypeScript.ASTSpan): boolean {
~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ASTSpan'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'ASTSpan'.
if (ast === null)
return false;
@@ -896,10 +896,10 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
///
export function getAstPathToPosition(script: TypeScript.AST, pos: number, options = GetAstPathOptions.Default): TypeScript.AstPath {
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
var lookInComments = (comments: TypeScript.Comment[]) => {
~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'Comment'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'Comment'.
if (comments && comments.length > 0) {
for (var i = 0; i < comments.length; i++) {
var minChar = comments[i].minChar;
@@ -916,9 +916,9 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: IAstWalker) {
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
~~~~~~~~~~
!!! error TS2304: Cannot find name 'IAstWalker'.
if (isValidAstNode(cur)) {
@@ -985,17 +985,17 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
//
export function getTokenizationOffset(script: TypeScript.Script, position: number): number {
~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'Script'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'Script'.
var bestOffset = 0;
var pre = (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker): TypeScript.AST => {
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'.
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
if (TypeScript.isValidAstNode(cur)) {
// Did we find a closer offset?
if (cur.minChar <= position) {
@@ -1022,16 +1022,16 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
///
export function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void ): void {
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'.
var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) {
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'.
var path: TypeScript.AstPath = walker.state;
path.push(cur);
callback(path, walker);
@@ -1039,11 +1039,11 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error
}
var post = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) {
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'.
~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'.
!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'.
var path: TypeScript.AstPath = walker.state;
path.pop();
return cur;

View File

@@ -2,7 +2,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(16,1): err
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(17,1): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/compiler/typescript.ts' not found.
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(18,1): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/services/typescriptServices.ts' not found.
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(19,1): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/RealWorld/diff.ts' not found.
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(21,29): error TS2305: Module 'Harness' has no exported member 'Assert'.
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(21,29): error TS2694: Namespace 'Harness' has no exported member 'Assert'.
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(25,17): error TS2304: Cannot find name 'IIO'.
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(41,12): error TS2304: Cannot find name 'ActiveXObject'.
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(43,19): error TS2304: Cannot find name 'require'.
@@ -141,7 +141,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32):
declare var assert: Harness.Assert;
~~~~~~
!!! error TS2305: Module 'Harness' has no exported member 'Assert'.
!!! error TS2694: Namespace 'Harness' has no exported member 'Assert'.
declare var it;
declare var describe;
declare var run;

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/sourceMapSample.ts(14,45): error TS2305: Module 'Foo.Bar' has no exported member 'Greeter'.
tests/cases/compiler/sourceMapSample.ts(14,45): error TS2694: Namespace 'Foo.Bar' has no exported member 'Greeter'.
==== tests/cases/compiler/sourceMapSample.ts (1 errors) ====
@@ -17,7 +17,7 @@ tests/cases/compiler/sourceMapSample.ts(14,45): error TS2305: Module 'Foo.Bar' h
function foo(greeting: string): Foo.Bar.Greeter {
~~~~~~~
!!! error TS2305: Module 'Foo.Bar' has no exported member 'Greeter'.
!!! error TS2694: Namespace 'Foo.Bar' has no exported member 'Greeter'.
return new Greeter(greeting);
}

View File

@@ -40,7 +40,7 @@ tests/cases/compiler/strictModeReservedWord.ts(22,22): error TS1212: Identifier
tests/cases/compiler/strictModeReservedWord.ts(22,30): error TS1212: Identifier expected. 'implements' is a reserved word in strict mode
tests/cases/compiler/strictModeReservedWord.ts(23,5): error TS2304: Cannot find name 'ublic'.
tests/cases/compiler/strictModeReservedWord.ts(24,5): error TS1212: Identifier expected. 'static' is a reserved word in strict mode
tests/cases/compiler/strictModeReservedWord.ts(24,5): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/compiler/strictModeReservedWord.ts(24,5): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
==== tests/cases/compiler/strictModeReservedWord.ts (43 errors) ====
@@ -153,7 +153,7 @@ tests/cases/compiler/strictModeReservedWord.ts(24,5): error TS2349: Cannot invok
~~~~~~
!!! error TS1212: Identifier expected. 'static' is a reserved word in strict mode
~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
}

View File

@@ -3,32 +3,32 @@ let fooOrBar: "foo" | "bar";
>fooOrBar : "foo" | "bar"
let a = "foo" as "bar";
>a : string
>a : "bar"
>"foo" as "bar" : "bar"
>"foo" : "foo"
let b = "bar" as "foo";
>b : string
>b : "foo"
>"bar" as "foo" : "foo"
>"bar" : "bar"
let c = fooOrBar as "foo";
>c : string
>c : "foo"
>fooOrBar as "foo" : "foo"
>fooOrBar : "foo" | "bar"
let d = fooOrBar as "bar";
>d : string
>d : "bar"
>fooOrBar as "bar" : "bar"
>fooOrBar : "foo" | "bar"
let e = fooOrBar as "baz";
>e : string
>e : "baz"
>fooOrBar as "baz" : "baz"
>fooOrBar : "foo" | "bar"
let f = "baz" as typeof fooOrBar;
>f : string
>f : "foo" | "bar"
>"baz" as typeof fooOrBar : "foo" | "bar"
>"baz" : "baz"
>fooOrBar : "foo" | "bar"

View File

@@ -1,4 +1,4 @@
tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping2.ts(10,43): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping2.ts(10,43): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Number' has no compatible call signatures.
==== tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping2.ts (1 errors) ====
@@ -13,5 +13,5 @@ tests/cases/conformance/expressions/contextualTyping/superCallParameterContextua
// Ensure 'value' is not of type 'any' by invoking it with type arguments.
constructor() { super(value => String(value<string>())); }
~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Number' has no compatible call signatures.
}

View File

@@ -1,4 +1,4 @@
tests/cases/conformance/es6/templates/taggedTemplateWithConstructableTag01.ts(3,1): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/es6/templates/taggedTemplateWithConstructableTag01.ts(3,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof CtorTag' has no compatible call signatures.
==== tests/cases/conformance/es6/templates/taggedTemplateWithConstructableTag01.ts (1 errors) ====
@@ -6,4 +6,4 @@ tests/cases/conformance/es6/templates/taggedTemplateWithConstructableTag01.ts(3,
CtorTag `Hello world!`;
~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof CtorTag' has no compatible call signatures.

View File

@@ -1,4 +1,4 @@
tests/cases/conformance/es6/templates/taggedTemplateWithConstructableTag02.ts(6,1): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/es6/templates/taggedTemplateWithConstructableTag02.ts(6,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'I' has no compatible call signatures.
==== tests/cases/conformance/es6/templates/taggedTemplateWithConstructableTag02.ts (1 errors) ====
@@ -9,4 +9,4 @@ tests/cases/conformance/es6/templates/taggedTemplateWithConstructableTag02.ts(6,
var tag: I;
tag `Hello world!`;
~~~~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'I' has no compatible call signatures.

View File

@@ -1,7 +1,7 @@
tests/cases/conformance/es6/templates/templateStringInCallExpression.ts(1,1): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/es6/templates/templateStringInCallExpression.ts(1,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
==== tests/cases/conformance/es6/templates/templateStringInCallExpression.ts (1 errors) ====
`abc${0}abc`(`hello ${0} world`, ` `, `1${2}3`);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.

View File

@@ -1,7 +1,7 @@
tests/cases/conformance/es6/templates/templateStringInCallExpressionES6.ts(1,1): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/es6/templates/templateStringInCallExpressionES6.ts(1,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
==== tests/cases/conformance/es6/templates/templateStringInCallExpressionES6.ts (1 errors) ====
`abc${0}abc`(`hello ${0} world`, ` `, `1${2}3`);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.

View File

@@ -1,4 +1,4 @@
tests/cases/conformance/es6/templates/templateStringInObjectLiteral.ts(1,9): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/es6/templates/templateStringInObjectLiteral.ts(1,9): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{ a: string; }' has no compatible call signatures.
tests/cases/conformance/es6/templates/templateStringInObjectLiteral.ts(3,5): error TS1136: Property assignment expected.
tests/cases/conformance/es6/templates/templateStringInObjectLiteral.ts(3,8): error TS1005: ',' expected.
tests/cases/conformance/es6/templates/templateStringInObjectLiteral.ts(3,10): error TS1134: Variable declaration expected.
@@ -12,7 +12,7 @@ tests/cases/conformance/es6/templates/templateStringInObjectLiteral.ts(4,1): err
~~~~~~~~~~~~~~~~~~~~~~~~
`b`: 321
~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{ a: string; }' has no compatible call signatures.
~~~
!!! error TS1136: Property assignment expected.
~

View File

@@ -1,4 +1,4 @@
tests/cases/conformance/es6/templates/templateStringInObjectLiteralES6.ts(1,9): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/es6/templates/templateStringInObjectLiteralES6.ts(1,9): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{ a: string; }' has no compatible call signatures.
tests/cases/conformance/es6/templates/templateStringInObjectLiteralES6.ts(3,5): error TS1136: Property assignment expected.
tests/cases/conformance/es6/templates/templateStringInObjectLiteralES6.ts(3,8): error TS1005: ',' expected.
tests/cases/conformance/es6/templates/templateStringInObjectLiteralES6.ts(3,10): error TS1134: Variable declaration expected.
@@ -12,7 +12,7 @@ tests/cases/conformance/es6/templates/templateStringInObjectLiteralES6.ts(4,1):
~~~~~~~~~~~~~~~~~~~~~~~~
`b`: 321
~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{ a: string; }' has no compatible call signatures.
~~~
!!! error TS1136: Property assignment expected.
~

View File

@@ -1,4 +1,4 @@
tests/cases/conformance/es6/templates/templateStringInPropertyName1.ts(1,9): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/es6/templates/templateStringInPropertyName1.ts(1,9): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.
tests/cases/conformance/es6/templates/templateStringInPropertyName1.ts(2,5): error TS1136: Property assignment expected.
tests/cases/conformance/es6/templates/templateStringInPropertyName1.ts(2,8): error TS1005: ',' expected.
tests/cases/conformance/es6/templates/templateStringInPropertyName1.ts(2,10): error TS1134: Variable declaration expected.
@@ -10,7 +10,7 @@ tests/cases/conformance/es6/templates/templateStringInPropertyName1.ts(3,1): err
~
`a`: 321
~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.
~~~
!!! error TS1136: Property assignment expected.
~

View File

@@ -1,4 +1,4 @@
tests/cases/conformance/es6/templates/templateStringInPropertyName2.ts(1,9): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/es6/templates/templateStringInPropertyName2.ts(1,9): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.
tests/cases/conformance/es6/templates/templateStringInPropertyName2.ts(2,5): error TS1136: Property assignment expected.
tests/cases/conformance/es6/templates/templateStringInPropertyName2.ts(2,32): error TS1005: ',' expected.
tests/cases/conformance/es6/templates/templateStringInPropertyName2.ts(2,34): error TS1134: Variable declaration expected.
@@ -10,7 +10,7 @@ tests/cases/conformance/es6/templates/templateStringInPropertyName2.ts(3,1): err
~
`abc${ 123 }def${ 456 }ghi`: 321
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.
~~~~~~
!!! error TS1136: Property assignment expected.
~

View File

@@ -1,4 +1,4 @@
tests/cases/conformance/es6/templates/templateStringInPropertyNameES6_1.ts(1,9): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/es6/templates/templateStringInPropertyNameES6_1.ts(1,9): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.
tests/cases/conformance/es6/templates/templateStringInPropertyNameES6_1.ts(2,5): error TS1136: Property assignment expected.
tests/cases/conformance/es6/templates/templateStringInPropertyNameES6_1.ts(2,8): error TS1005: ',' expected.
tests/cases/conformance/es6/templates/templateStringInPropertyNameES6_1.ts(2,10): error TS1134: Variable declaration expected.
@@ -10,7 +10,7 @@ tests/cases/conformance/es6/templates/templateStringInPropertyNameES6_1.ts(3,1):
~
`a`: 321
~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.
~~~
!!! error TS1136: Property assignment expected.
~

View File

@@ -1,4 +1,4 @@
tests/cases/conformance/es6/templates/templateStringInPropertyNameES6_2.ts(1,9): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/es6/templates/templateStringInPropertyNameES6_2.ts(1,9): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.
tests/cases/conformance/es6/templates/templateStringInPropertyNameES6_2.ts(2,5): error TS1136: Property assignment expected.
tests/cases/conformance/es6/templates/templateStringInPropertyNameES6_2.ts(2,32): error TS1005: ',' expected.
tests/cases/conformance/es6/templates/templateStringInPropertyNameES6_2.ts(2,34): error TS1134: Variable declaration expected.
@@ -10,7 +10,7 @@ tests/cases/conformance/es6/templates/templateStringInPropertyNameES6_2.ts(3,1):
~
`abc${ 123 }def${ 456 }ghi`: 321
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.
~~~~~~
!!! error TS1136: Property assignment expected.
~

View File

@@ -1,7 +1,7 @@
tests/cases/conformance/es6/templates/templateStringInTaggedTemplate.ts(1,1): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/es6/templates/templateStringInTaggedTemplate.ts(1,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
==== tests/cases/conformance/es6/templates/templateStringInTaggedTemplate.ts (1 errors) ====
`I AM THE ${ `${ `TAG` } ` } PORTION` `I ${ "AM" } THE TEMPLATE PORTION`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.

View File

@@ -1,7 +1,7 @@
tests/cases/conformance/es6/templates/templateStringInTaggedTemplateES6.ts(1,1): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/es6/templates/templateStringInTaggedTemplateES6.ts(1,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
==== tests/cases/conformance/es6/templates/templateStringInTaggedTemplateES6.ts (1 errors) ====
`I AM THE ${ `${ `TAG` } ` } PORTION` `I ${ "AM" } THE TEMPLATE PORTION`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.

View File

@@ -2,14 +2,14 @@ tests/cases/conformance/types/union/unionTypeCallSignatures.ts(9,43): error TS23
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(10,29): error TS2345: Argument of type 'true' is not assignable to parameter of type 'string'.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(15,29): error TS2345: Argument of type 'true' is not assignable to parameter of type 'string'.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(16,1): error TS2346: Supplied parameters do not match any signature of call target.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(19,1): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(20,1): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(21,1): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(19,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((a: number) => number) | ((a: string) => Date)' has no compatible call signatures.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(20,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((a: number) => number) | ((a: string) => Date)' has no compatible call signatures.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(21,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((a: number) => number) | ((a: string) => Date)' has no compatible call signatures.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(24,1): error TS2346: Supplied parameters do not match any signature of call target.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(26,36): error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(29,1): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(30,1): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(31,1): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(29,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((a: string) => string) | ((a: string, b: number) => number)' has no compatible call signatures.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(30,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((a: string) => string) | ((a: string, b: number) => number)' has no compatible call signatures.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(31,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((a: string) => string) | ((a: string, b: number) => number)' has no compatible call signatures.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(36,49): error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(37,12): error TS2346: Supplied parameters do not match any signature of call target.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(40,12): error TS2346: Supplied parameters do not match any signature of call target.
@@ -60,13 +60,13 @@ tests/cases/conformance/types/union/unionTypeCallSignatures.ts(73,12): error TS2
var unionOfDifferentParameterTypes: { (a: number): number; } | { (a: string): Date; };
unionOfDifferentParameterTypes(10);// error - no call signatures
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((a: number) => number) | ((a: string) => Date)' has no compatible call signatures.
unionOfDifferentParameterTypes("hello");// error - no call signatures
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((a: number) => number) | ((a: string) => Date)' has no compatible call signatures.
unionOfDifferentParameterTypes();// error - no call signatures
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((a: number) => number) | ((a: string) => Date)' has no compatible call signatures.
var unionOfDifferentNumberOfSignatures: { (a: number): number; } | { (a: number): Date; (a: string): boolean; };
unionOfDifferentNumberOfSignatures(); // error - no call signatures
@@ -80,13 +80,13 @@ tests/cases/conformance/types/union/unionTypeCallSignatures.ts(73,12): error TS2
var unionWithDifferentParameterCount: { (a: string): string; } | { (a: string, b: number): number; } ;
unionWithDifferentParameterCount();// no call signature
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((a: string) => string) | ((a: string, b: number) => number)' has no compatible call signatures.
unionWithDifferentParameterCount("hello");// no call signature
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((a: string) => string) | ((a: string, b: number) => number)' has no compatible call signatures.
unionWithDifferentParameterCount("hello", 10);// no call signature
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((a: string) => string) | ((a: string, b: number) => number)' has no compatible call signatures.
var unionWithOptionalParameter1: { (a: string, b?: number): string; } | { (a: string, b?: number): number; };
strOrNum = unionWithOptionalParameter1('hello');

View File

@@ -1,4 +1,4 @@
tests/cases/conformance/types/union/unionTypeMembers.ts(44,1): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/conformance/types/union/unionTypeMembers.ts(44,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((a: string) => string) | ((a: number) => number)' has no compatible call signatures.
tests/cases/conformance/types/union/unionTypeMembers.ts(51,3): error TS2339: Property 'propertyOnlyInI1' does not exist on type 'I1<number> | I2<number>'.
Property 'propertyOnlyInI1' does not exist on type 'I2<number>'.
tests/cases/conformance/types/union/unionTypeMembers.ts(52,3): error TS2339: Property 'propertyOnlyInI2' does not exist on type 'I1<number> | I2<number>'.
@@ -55,7 +55,7 @@ tests/cases/conformance/types/union/unionTypeMembers.ts(54,3): error TS2339: Pro
x.commonMethodDifferentParameterType; // No error - property exists
x.commonMethodDifferentParameterType(strOrNum); // error - no call signatures because the type of this property is ((a: string) => string) | (a: number) => number
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((a: string) => string) | ((a: number) => number)' has no compatible call signatures.
// and the call signatures arent identical
num = x.commonMethodWithTypeParameter(num);
num = x.commonMethodWithOwnTypeParameter(num);

View File

@@ -3,7 +3,7 @@ tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(5,10): error TS2
tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(8,10): error TS2347: Untyped function calls may not accept type arguments.
tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(10,7): error TS2420: Class 'C' incorrectly implements interface 'Function'.
Property 'apply' is missing in type 'C'.
tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(18,10): error TS2349: Cannot invoke an expression whose type lacks a call signature.
tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(18,10): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'C' has no compatible call signatures.
tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(22,10): error TS2347: Untyped function calls may not accept type arguments.
tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(28,10): error TS2346: Supplied parameters do not match any signature of call target.
tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(35,1): error TS2346: Supplied parameters do not match any signature of call target.
@@ -39,7 +39,7 @@ tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(41,1): error TS2
var c2: C;
var r4 = c2<number>(); // should be an error
~~~~~~~~~~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'C' has no compatible call signatures.
class C2 extends Function { } // error
var c3: C2;

View File

@@ -0,0 +1,16 @@
// @declaration: true
namespace N {
function S() {}
}
module M {
function F() {}
}
declare namespace ns {
let f: number;
}
var foge: N.S;
var foo: M.F;
let x: ns.A;

View File

@@ -0,0 +1,13 @@
const obj = {
a: "foo" as "foo",
b: <"foo">"foo",
c: "foo"
};
let x1 = 1 as (0 | 1);
let x2 = 1;
let { a = "foo" } = { a: "foo" };
let { b = "foo" as "foo" } = { b: "bar" };
let { c = "foo" } = { c: "bar" as "bar" };
let { d = "foo" as "foo" } = { d: "bar" as "bar" };

View File

@@ -8,6 +8,7 @@
/////*InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis*/(1 )
/////*InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets*/[1 ]; [ ]; []; [,];
/////*InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces*/`${1}`;`${ 1 }`
/////*InsertSpaceAfterTypeAssertion*/const bar = <Bar> Thing.getFoo();
/////*PlaceOpenBraceOnNewLineForFunctions*/class foo {
////}
/////*PlaceOpenBraceOnNewLineForControlBlocks*/if (true) {
@@ -22,6 +23,7 @@ runTest("InsertSpaceAfterFunctionKeywordForAnonymousFunctions", "(function () {
runTest("InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis", " ( 1 )", " (1)");
runTest("InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets", "[ 1 ];[];[];[ , ];", "[1];[];[];[,];");
runTest("InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces", "`${ 1 }`; `${ 1 }`", "`${1}`; `${1}`");
runTest("InsertSpaceAfterTypeAssertion", "const bar = <Bar> Thing.getFoo();", "const bar = <Bar>Thing.getFoo();");
runTest("PlaceOpenBraceOnNewLineForFunctions", "class foo", "class foo {");
runTest("PlaceOpenBraceOnNewLineForControlBlocks", "if ( true )", "if ( true ) {");
runTest("InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces", "{ var t = 1 };", "{var t = 1};");

View File

@@ -83,6 +83,7 @@ declare namespace FourSlashInterface {
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean;
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean;
InsertSpaceAfterTypeAssertion: boolean;
PlaceOpenBraceOnNewLineForFunctions: boolean;
PlaceOpenBraceOnNewLineForControlBlocks: boolean;
[s: string]: boolean | number | string | undefined;