mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-21 13:14:43 -06:00
merge with master
This commit is contained in:
commit
8ff551ce08
6
.gitignore
vendored
6
.gitignore
vendored
@ -21,15 +21,16 @@ tests/services/baselines/local/*
|
||||
tests/baselines/prototyping/local/*
|
||||
tests/baselines/rwc/*
|
||||
tests/baselines/test262/*
|
||||
tests/baselines/reference/projectOutput/*
|
||||
tests/baselines/reference/projectOutput/*
|
||||
tests/baselines/local/projectOutput/*
|
||||
tests/services/baselines/prototyping/local/*
|
||||
tests/services/browser/typescriptServices.js
|
||||
scripts/configureNightly.js
|
||||
scripts/processDiagnosticMessages.d.ts
|
||||
scripts/processDiagnosticMessages.js
|
||||
scripts/importDefinitelyTypedTests.js
|
||||
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
|
||||
src/harness/*.js
|
||||
src/compiler/diagnosticInformationMap.generated.ts
|
||||
rwc-report.html
|
||||
*.swp
|
||||
build.json
|
||||
@ -45,6 +46,7 @@ scripts/run.bat
|
||||
scripts/word2md.js
|
||||
scripts/ior.js
|
||||
scripts/*.js.map
|
||||
scripts/typings/
|
||||
coverage/
|
||||
internal/
|
||||
**/.DS_Store
|
||||
|
||||
75
Jakefile.js
75
Jakefile.js
@ -206,6 +206,9 @@ function concatenateFiles(destinationFile, sourceFiles) {
|
||||
var useDebugMode = true;
|
||||
var host = (process.env.host || process.env.TYPESCRIPT_HOST || "node");
|
||||
var compilerFilename = "tsc.js";
|
||||
var LKGCompiler = path.join(LKGDirectory, compilerFilename);
|
||||
var builtLocalCompiler = path.join(builtLocalDirectory, compilerFilename);
|
||||
|
||||
/* Compiles a file from a list of sources
|
||||
* @param outFile: the target file name
|
||||
* @param sources: an array of the names of the source files
|
||||
@ -220,7 +223,7 @@ var compilerFilename = "tsc.js";
|
||||
*/
|
||||
function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, outDir, preserveConstEnums, keepComments, noResolve, stripInternal, callback) {
|
||||
file(outFile, prereqs, function() {
|
||||
var dir = useBuiltCompiler ? builtLocalDirectory : LKGDirectory;
|
||||
var compilerPath = useBuiltCompiler ? builtLocalCompiler : LKGCompiler;
|
||||
var options = "--module commonjs --noImplicitAny --noEmitOnError";
|
||||
|
||||
// Keep comments when specifically requested
|
||||
@ -257,7 +260,7 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOu
|
||||
options += " --stripInternal"
|
||||
}
|
||||
|
||||
var cmd = host + " " + dir + compilerFilename + " " + options + " ";
|
||||
var cmd = host + " " + compilerPath + " " + options + " ";
|
||||
cmd = cmd + sources.join(" ");
|
||||
console.log(cmd + "\n");
|
||||
|
||||
@ -328,7 +331,7 @@ compileFile(processDiagnosticMessagesJs,
|
||||
|
||||
// The generated diagnostics map; built for the compiler and for the 'generate-diagnostics' task
|
||||
file(diagnosticInfoMapTs, [processDiagnosticMessagesJs, diagnosticMessagesJson], function () {
|
||||
var cmd = "node " + processDiagnosticMessagesJs + " " + diagnosticMessagesJson;
|
||||
var cmd = host + " " + processDiagnosticMessagesJs + " " + diagnosticMessagesJson;
|
||||
console.log(cmd);
|
||||
var ex = jake.createExec([cmd]);
|
||||
// Add listeners for output and error
|
||||
@ -374,7 +377,7 @@ task("setDebugMode", function() {
|
||||
});
|
||||
|
||||
task("configure-nightly", [configureNightlyJs], function() {
|
||||
var cmd = "node " + configureNightlyJs + " " + packageJson + " " + programTs;
|
||||
var cmd = host + " " + configureNightlyJs + " " + packageJson + " " + programTs;
|
||||
console.log(cmd);
|
||||
exec(cmd);
|
||||
}, { async: true });
|
||||
@ -386,6 +389,32 @@ task("publish-nightly", ["configure-nightly", "LKG", "clean", "setDebugMode", "r
|
||||
exec(cmd);
|
||||
});
|
||||
|
||||
var scriptsTsdJson = path.join(scriptsDirectory, "tsd.json");
|
||||
file(scriptsTsdJson);
|
||||
|
||||
task("tsd-scripts", [scriptsTsdJson], function () {
|
||||
var cmd = "tsd --config " + scriptsTsdJson + " install";
|
||||
console.log(cmd)
|
||||
exec(cmd);
|
||||
}, { async: true })
|
||||
|
||||
var importDefinitelyTypedTestsDirectory = path.join(scriptsDirectory, "importDefinitelyTypedTests");
|
||||
var importDefinitelyTypedTestsJs = path.join(importDefinitelyTypedTestsDirectory, "importDefinitelyTypedTests.js");
|
||||
var importDefinitelyTypedTestsTs = path.join(importDefinitelyTypedTestsDirectory, "importDefinitelyTypedTests.ts");
|
||||
|
||||
file(importDefinitelyTypedTestsTs);
|
||||
file(importDefinitelyTypedTestsJs, ["tsd-scripts", importDefinitelyTypedTestsTs], function () {
|
||||
var cmd = host + " " + LKGCompiler + " -p " + importDefinitelyTypedTestsDirectory;
|
||||
console.log(cmd);
|
||||
exec(cmd);
|
||||
}, { async: true });
|
||||
|
||||
task("importDefinitelyTypedTests", [importDefinitelyTypedTestsJs], function () {
|
||||
var cmd = host + " " + importDefinitelyTypedTestsJs + " ./ ../DefinitelyTyped";
|
||||
console.log(cmd);
|
||||
exec(cmd);
|
||||
}, { async: true });
|
||||
|
||||
// Local target to build the compiler and services
|
||||
var tscFile = path.join(builtLocalDirectory, compilerFilename);
|
||||
compileFile(tscFile, compilerSources, [builtLocalDirectory, copyright].concat(compilerSources), [copyright], /*useBuiltCompiler:*/ false);
|
||||
@ -394,6 +423,7 @@ var servicesFile = path.join(builtLocalDirectory, "typescriptServices.js");
|
||||
var standaloneDefinitionsFile = path.join(builtLocalDirectory, "typescriptServices.d.ts");
|
||||
var nodePackageFile = path.join(builtLocalDirectory, "typescript.js");
|
||||
var nodeDefinitionsFile = path.join(builtLocalDirectory, "typescript.d.ts");
|
||||
var nodeStandaloneDefinitionsFile = path.join(builtLocalDirectory, "typescript_standalone.d.ts");
|
||||
|
||||
compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].concat(servicesSources),
|
||||
/*prefixes*/ [copyright],
|
||||
@ -410,11 +440,19 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca
|
||||
|
||||
prependFile(copyright, standaloneDefinitionsFile);
|
||||
|
||||
// Create the node definition file by replacing 'ts' module with '"typescript"' as a module.
|
||||
// Stanalone/web definition file using global 'ts' namespace
|
||||
jake.cpR(standaloneDefinitionsFile, nodeDefinitionsFile, {silent: true});
|
||||
var definitionFileContents = fs.readFileSync(nodeDefinitionsFile).toString();
|
||||
definitionFileContents = definitionFileContents.replace(/declare (namespace|module) ts/g, 'declare module "typescript"');
|
||||
fs.writeFileSync(nodeDefinitionsFile, definitionFileContents);
|
||||
|
||||
// Official node package definition file, pointed to by 'typings' in package.json
|
||||
// Created by appending 'export = ts;' at the end of the standalone file to turn it into an external module
|
||||
var nodeDefinitionsFileContents = definitionFileContents + "\r\nexport = ts;";
|
||||
fs.writeFileSync(nodeDefinitionsFile, nodeDefinitionsFileContents);
|
||||
|
||||
// Node package definition file to be distributed without the package. Created by replacing
|
||||
// 'ts' namespace with '"typescript"' as a module.
|
||||
var nodeStandaloneDefinitionsFileContents = definitionFileContents.replace(/declare (namespace|module) ts/g, 'declare module "typescript"');
|
||||
fs.writeFileSync(nodeStandaloneDefinitionsFile, nodeStandaloneDefinitionsFileContents);
|
||||
});
|
||||
|
||||
|
||||
@ -771,17 +809,36 @@ task("update-sublime", ["local", serverFile], function() {
|
||||
jake.cpR(serverFile + ".map", "../TypeScript-Sublime-Plugin/tsserver/");
|
||||
});
|
||||
|
||||
var tslintRuleDir = "scripts/tslint";
|
||||
var tslintRules = ([
|
||||
"nextLineRule",
|
||||
"noInferrableTypesRule",
|
||||
"noNullRule",
|
||||
"booleanTriviaRule"
|
||||
]);
|
||||
var tslintRulesFiles = tslintRules.map(function(p) {
|
||||
return path.join(tslintRuleDir, p + ".ts");
|
||||
});
|
||||
var tslintRulesOutFiles = tslintRules.map(function(p) {
|
||||
return path.join(builtLocalDirectory, "tslint", p + ".js");
|
||||
});
|
||||
desc("Compiles tslint rules to js");
|
||||
task("build-rules", tslintRulesOutFiles);
|
||||
tslintRulesFiles.forEach(function(ruleFile, i) {
|
||||
compileFile(tslintRulesOutFiles[i], [ruleFile], [ruleFile], [], /*useBuiltCompiler*/ true, /*noOutFile*/ true, /*generateDeclarations*/ false, path.join(builtLocalDirectory, "tslint"));
|
||||
});
|
||||
|
||||
// if the codebase were free of linter errors we could make jake runtests
|
||||
// run this task automatically
|
||||
desc("Runs tslint on the compiler sources");
|
||||
task("lint", [], function() {
|
||||
task("lint", ["build-rules"], function() {
|
||||
function success(f) { return function() { console.log('SUCCESS: No linter errors in ' + f + '\n'); }};
|
||||
function failure(f) { return function() { console.log('FAILURE: Please fix linting errors in ' + f + '\n') }};
|
||||
|
||||
var lintTargets = compilerSources.concat(harnessCoreSources);
|
||||
for (var i in lintTargets) {
|
||||
var f = lintTargets[i];
|
||||
var cmd = 'tslint -c tslint.json ' + f;
|
||||
var cmd = 'tslint --rules-dir built/local/tslint -c tslint.json ' + f;
|
||||
exec(cmd, success(f), failure(f));
|
||||
}
|
||||
}, { async: true });
|
||||
|
||||
@ -30,7 +30,7 @@ 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](http://go.microsoft.com/fwlink/?LinkId=267121), [pdf](http://go.microsoft.com/fwlink/?LinkId=267238)).
|
||||
* 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)).
|
||||
|
||||
|
||||
## Documentation
|
||||
|
||||
29
lib/lib.core.es6.d.ts
vendored
29
lib/lib.core.es6.d.ts
vendored
@ -3965,7 +3965,34 @@ interface ObjectConstructor {
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param sources One or more source objects to copy properties from.
|
||||
* @param source The source object from which to copy properties.
|
||||
*/
|
||||
assign<T, U>(target: T, source: U): T & U;
|
||||
|
||||
/**
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param source1 The first source object from which to copy properties.
|
||||
* @param source2 The second source object from which to copy properties.
|
||||
*/
|
||||
assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
|
||||
|
||||
/**
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param source1 The first source object from which to copy properties.
|
||||
* @param source2 The second source object from which to copy properties.
|
||||
* @param source3 The third source object from which to copy properties.
|
||||
*/
|
||||
assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
|
||||
|
||||
/**
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param sources One or more source objects from which to copy properties
|
||||
*/
|
||||
assign(target: any, ...sources: any[]): any;
|
||||
|
||||
|
||||
36
lib/lib.d.ts
vendored
36
lib/lib.d.ts
vendored
@ -3881,7 +3881,7 @@ declare module Intl {
|
||||
currency?: string;
|
||||
currencyDisplay?: string;
|
||||
useGrouping?: boolean;
|
||||
minimumintegerDigits?: number;
|
||||
minimumIntegerDigits?: number;
|
||||
minimumFractionDigits?: number;
|
||||
maximumFractionDigits?: number;
|
||||
minimumSignificantDigits?: number;
|
||||
@ -3894,7 +3894,7 @@ declare module Intl {
|
||||
style: string;
|
||||
currency?: string;
|
||||
currencyDisplay?: string;
|
||||
minimumintegerDigits: number;
|
||||
minimumIntegerDigits: number;
|
||||
minimumFractionDigits: number;
|
||||
maximumFractionDigits: number;
|
||||
minimumSignificantDigits?: number;
|
||||
@ -3928,6 +3928,7 @@ declare module Intl {
|
||||
timeZoneName?: string;
|
||||
formatMatcher?: string;
|
||||
hour12?: boolean;
|
||||
timeZone?: string;
|
||||
}
|
||||
|
||||
interface ResolvedDateTimeFormatOptions {
|
||||
@ -3997,18 +3998,45 @@ interface Number {
|
||||
|
||||
interface Date {
|
||||
/**
|
||||
* Converts a date to a string by using the current or specified locale.
|
||||
* Converts a date and time to a string by using the current or specified locale.
|
||||
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
|
||||
/**
|
||||
* Converts a date to a string by using the current or specified locale.
|
||||
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a time to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a date and time to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a date to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a time to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
36
lib/lib.dom.d.ts
vendored
36
lib/lib.dom.d.ts
vendored
@ -57,7 +57,7 @@ declare module Intl {
|
||||
currency?: string;
|
||||
currencyDisplay?: string;
|
||||
useGrouping?: boolean;
|
||||
minimumintegerDigits?: number;
|
||||
minimumIntegerDigits?: number;
|
||||
minimumFractionDigits?: number;
|
||||
maximumFractionDigits?: number;
|
||||
minimumSignificantDigits?: number;
|
||||
@ -70,7 +70,7 @@ declare module Intl {
|
||||
style: string;
|
||||
currency?: string;
|
||||
currencyDisplay?: string;
|
||||
minimumintegerDigits: number;
|
||||
minimumIntegerDigits: number;
|
||||
minimumFractionDigits: number;
|
||||
maximumFractionDigits: number;
|
||||
minimumSignificantDigits?: number;
|
||||
@ -104,6 +104,7 @@ declare module Intl {
|
||||
timeZoneName?: string;
|
||||
formatMatcher?: string;
|
||||
hour12?: boolean;
|
||||
timeZone?: string;
|
||||
}
|
||||
|
||||
interface ResolvedDateTimeFormatOptions {
|
||||
@ -173,18 +174,45 @@ interface Number {
|
||||
|
||||
interface Date {
|
||||
/**
|
||||
* Converts a date to a string by using the current or specified locale.
|
||||
* Converts a date and time to a string by using the current or specified locale.
|
||||
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
|
||||
/**
|
||||
* Converts a date to a string by using the current or specified locale.
|
||||
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a time to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a date and time to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a date to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a time to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
65
lib/lib.es6.d.ts
vendored
65
lib/lib.es6.d.ts
vendored
@ -3965,7 +3965,34 @@ interface ObjectConstructor {
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param sources One or more source objects to copy properties from.
|
||||
* @param source The source object from which to copy properties.
|
||||
*/
|
||||
assign<T, U>(target: T, source: U): T & U;
|
||||
|
||||
/**
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param source1 The first source object from which to copy properties.
|
||||
* @param source2 The second source object from which to copy properties.
|
||||
*/
|
||||
assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
|
||||
|
||||
/**
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param source1 The first source object from which to copy properties.
|
||||
* @param source2 The second source object from which to copy properties.
|
||||
* @param source3 The third source object from which to copy properties.
|
||||
*/
|
||||
assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
|
||||
|
||||
/**
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param sources One or more source objects from which to copy properties
|
||||
*/
|
||||
assign(target: any, ...sources: any[]): any;
|
||||
|
||||
@ -5169,7 +5196,7 @@ declare module Intl {
|
||||
currency?: string;
|
||||
currencyDisplay?: string;
|
||||
useGrouping?: boolean;
|
||||
minimumintegerDigits?: number;
|
||||
minimumIntegerDigits?: number;
|
||||
minimumFractionDigits?: number;
|
||||
maximumFractionDigits?: number;
|
||||
minimumSignificantDigits?: number;
|
||||
@ -5182,7 +5209,7 @@ declare module Intl {
|
||||
style: string;
|
||||
currency?: string;
|
||||
currencyDisplay?: string;
|
||||
minimumintegerDigits: number;
|
||||
minimumIntegerDigits: number;
|
||||
minimumFractionDigits: number;
|
||||
maximumFractionDigits: number;
|
||||
minimumSignificantDigits?: number;
|
||||
@ -5216,6 +5243,7 @@ declare module Intl {
|
||||
timeZoneName?: string;
|
||||
formatMatcher?: string;
|
||||
hour12?: boolean;
|
||||
timeZone?: string;
|
||||
}
|
||||
|
||||
interface ResolvedDateTimeFormatOptions {
|
||||
@ -5285,18 +5313,45 @@ interface Number {
|
||||
|
||||
interface Date {
|
||||
/**
|
||||
* Converts a date to a string by using the current or specified locale.
|
||||
* Converts a date and time to a string by using the current or specified locale.
|
||||
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
|
||||
/**
|
||||
* Converts a date to a string by using the current or specified locale.
|
||||
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a time to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a date and time to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a date to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a time to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
36
lib/lib.webworker.d.ts
vendored
36
lib/lib.webworker.d.ts
vendored
@ -57,7 +57,7 @@ declare module Intl {
|
||||
currency?: string;
|
||||
currencyDisplay?: string;
|
||||
useGrouping?: boolean;
|
||||
minimumintegerDigits?: number;
|
||||
minimumIntegerDigits?: number;
|
||||
minimumFractionDigits?: number;
|
||||
maximumFractionDigits?: number;
|
||||
minimumSignificantDigits?: number;
|
||||
@ -70,7 +70,7 @@ declare module Intl {
|
||||
style: string;
|
||||
currency?: string;
|
||||
currencyDisplay?: string;
|
||||
minimumintegerDigits: number;
|
||||
minimumIntegerDigits: number;
|
||||
minimumFractionDigits: number;
|
||||
maximumFractionDigits: number;
|
||||
minimumSignificantDigits?: number;
|
||||
@ -104,6 +104,7 @@ declare module Intl {
|
||||
timeZoneName?: string;
|
||||
formatMatcher?: string;
|
||||
hour12?: boolean;
|
||||
timeZone?: string;
|
||||
}
|
||||
|
||||
interface ResolvedDateTimeFormatOptions {
|
||||
@ -173,18 +174,45 @@ interface Number {
|
||||
|
||||
interface Date {
|
||||
/**
|
||||
* Converts a date to a string by using the current or specified locale.
|
||||
* Converts a date and time to a string by using the current or specified locale.
|
||||
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
|
||||
/**
|
||||
* Converts a date to a string by using the current or specified locale.
|
||||
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a time to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a date and time to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a date to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a time to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
783
lib/tsc.js
783
lib/tsc.js
File diff suppressed because it is too large
Load Diff
1009
lib/tsserver.js
1009
lib/tsserver.js
File diff suppressed because it is too large
Load Diff
39
lib/typescript.d.ts
vendored
39
lib/typescript.d.ts
vendored
@ -13,7 +13,7 @@ See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */
|
||||
|
||||
declare module "typescript" {
|
||||
declare namespace ts {
|
||||
interface Map<T> {
|
||||
[index: string]: T;
|
||||
}
|
||||
@ -1208,9 +1208,11 @@ declare module "typescript" {
|
||||
UnionOrIntersection = 49152,
|
||||
StructuredType = 130048,
|
||||
}
|
||||
type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
|
||||
interface Type {
|
||||
flags: TypeFlags;
|
||||
symbol?: Symbol;
|
||||
pattern?: DestructuringPattern;
|
||||
}
|
||||
interface StringLiteralType extends Type {
|
||||
text: string;
|
||||
@ -1237,7 +1239,6 @@ declare module "typescript" {
|
||||
}
|
||||
interface TupleType extends ObjectType {
|
||||
elementTypes: Type[];
|
||||
baseArrayType: TypeReference;
|
||||
}
|
||||
interface UnionOrIntersectionType extends Type {
|
||||
types: Type[];
|
||||
@ -1382,9 +1383,12 @@ declare module "typescript" {
|
||||
}
|
||||
interface ResolvedModule {
|
||||
resolvedFileName: string;
|
||||
isExternalLibraryImport?: boolean;
|
||||
}
|
||||
interface ResolvedModuleWithFailedLookupLocations {
|
||||
resolvedModule: ResolvedModule;
|
||||
failedLookupLocations: string[];
|
||||
}
|
||||
type ModuleNameResolver = (moduleName: string, containingFile: string, options: CompilerOptions, host: ModuleResolutionHost) => ResolvedModule;
|
||||
interface CompilerHost extends ModuleResolutionHost {
|
||||
getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile;
|
||||
getCancellationToken?(): CancellationToken;
|
||||
@ -1394,7 +1398,7 @@ declare module "typescript" {
|
||||
getCanonicalFileName(fileName: string): string;
|
||||
useCaseSensitiveFileNames(): boolean;
|
||||
getNewLine(): string;
|
||||
resolveModuleNames?(moduleNames: string[], containingFile: string): string[];
|
||||
resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[];
|
||||
}
|
||||
interface TextSpan {
|
||||
start: number;
|
||||
@ -1405,7 +1409,7 @@ declare module "typescript" {
|
||||
newLength: number;
|
||||
}
|
||||
}
|
||||
declare module "typescript" {
|
||||
declare namespace ts {
|
||||
interface System {
|
||||
args: string[];
|
||||
newLine: string;
|
||||
@ -1429,7 +1433,7 @@ declare module "typescript" {
|
||||
}
|
||||
var sys: System;
|
||||
}
|
||||
declare module "typescript" {
|
||||
declare namespace ts {
|
||||
interface ErrorCallback {
|
||||
(message: DiagnosticMessage, length: number): void;
|
||||
}
|
||||
@ -1474,7 +1478,7 @@ declare module "typescript" {
|
||||
function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean;
|
||||
function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, text?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner;
|
||||
}
|
||||
declare module "typescript" {
|
||||
declare namespace ts {
|
||||
function getDefaultLibFileName(options: CompilerOptions): string;
|
||||
function textSpanEnd(span: TextSpan): number;
|
||||
function textSpanIsEmpty(span: TextSpan): boolean;
|
||||
@ -1504,33 +1508,32 @@ declare module "typescript" {
|
||||
function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange;
|
||||
function getTypeParameterOwner(d: Declaration): Declaration;
|
||||
}
|
||||
declare module "typescript" {
|
||||
declare namespace ts {
|
||||
function getNodeConstructor(kind: SyntaxKind): new () => Node;
|
||||
function createNode(kind: SyntaxKind): Node;
|
||||
function forEachChild<T>(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T;
|
||||
function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean): SourceFile;
|
||||
function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
|
||||
}
|
||||
declare module "typescript" {
|
||||
declare namespace ts {
|
||||
const version: string;
|
||||
function findConfigFile(searchPath: string): string;
|
||||
function resolveTripleslashReference(moduleName: string, containingFile: string): string;
|
||||
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModule;
|
||||
function nodeModuleNameResolver(moduleName: string, containingFile: string, host: ModuleResolutionHost): ResolvedModule;
|
||||
function baseUrlModuleNameResolver(moduleName: string, containingFile: string, baseUrl: string, host: ModuleResolutionHost): ResolvedModule;
|
||||
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModule;
|
||||
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function nodeModuleNameResolver(moduleName: string, containingFile: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
|
||||
function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
|
||||
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
|
||||
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program): Program;
|
||||
}
|
||||
declare module "typescript" {
|
||||
declare namespace ts {
|
||||
function parseCommandLine(commandLine: string[], readFile?: (path: string) => string): ParsedCommandLine;
|
||||
/**
|
||||
* Read tsconfig.json file
|
||||
* @param fileName The path to the config file
|
||||
*/
|
||||
function readConfigFile(fileName: string): {
|
||||
function readConfigFile(fileName: string, readFile: (path: string) => string): {
|
||||
config?: any;
|
||||
error?: Diagnostic;
|
||||
};
|
||||
@ -1551,7 +1554,7 @@ declare module "typescript" {
|
||||
*/
|
||||
function parseConfigFile(json: any, host: ParseConfigHost, basePath: string): ParsedCommandLine;
|
||||
}
|
||||
declare module "typescript" {
|
||||
declare namespace ts {
|
||||
/** The version of the language service API */
|
||||
let servicesVersion: string;
|
||||
interface Node {
|
||||
@ -1649,7 +1652,7 @@ declare module "typescript" {
|
||||
trace?(s: string): void;
|
||||
error?(s: string): void;
|
||||
useCaseSensitiveFileNames?(): boolean;
|
||||
resolveModuleNames?(moduleNames: string[], containingFile: string): string[];
|
||||
resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[];
|
||||
}
|
||||
interface LanguageService {
|
||||
cleanupSemanticCache(): void;
|
||||
@ -2139,3 +2142,5 @@ declare module "typescript" {
|
||||
*/
|
||||
function getDefaultLibFilePath(options: CompilerOptions): string;
|
||||
}
|
||||
|
||||
export = ts;
|
||||
File diff suppressed because it is too large
Load Diff
21
lib/typescriptServices.d.ts
vendored
21
lib/typescriptServices.d.ts
vendored
@ -1208,9 +1208,11 @@ declare namespace ts {
|
||||
UnionOrIntersection = 49152,
|
||||
StructuredType = 130048,
|
||||
}
|
||||
type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
|
||||
interface Type {
|
||||
flags: TypeFlags;
|
||||
symbol?: Symbol;
|
||||
pattern?: DestructuringPattern;
|
||||
}
|
||||
interface StringLiteralType extends Type {
|
||||
text: string;
|
||||
@ -1237,7 +1239,6 @@ declare namespace ts {
|
||||
}
|
||||
interface TupleType extends ObjectType {
|
||||
elementTypes: Type[];
|
||||
baseArrayType: TypeReference;
|
||||
}
|
||||
interface UnionOrIntersectionType extends Type {
|
||||
types: Type[];
|
||||
@ -1382,9 +1383,12 @@ declare namespace ts {
|
||||
}
|
||||
interface ResolvedModule {
|
||||
resolvedFileName: string;
|
||||
isExternalLibraryImport?: boolean;
|
||||
}
|
||||
interface ResolvedModuleWithFailedLookupLocations {
|
||||
resolvedModule: ResolvedModule;
|
||||
failedLookupLocations: string[];
|
||||
}
|
||||
type ModuleNameResolver = (moduleName: string, containingFile: string, options: CompilerOptions, host: ModuleResolutionHost) => ResolvedModule;
|
||||
interface CompilerHost extends ModuleResolutionHost {
|
||||
getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile;
|
||||
getCancellationToken?(): CancellationToken;
|
||||
@ -1394,7 +1398,7 @@ declare namespace ts {
|
||||
getCanonicalFileName(fileName: string): string;
|
||||
useCaseSensitiveFileNames(): boolean;
|
||||
getNewLine(): string;
|
||||
resolveModuleNames?(moduleNames: string[], containingFile: string): string[];
|
||||
resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[];
|
||||
}
|
||||
interface TextSpan {
|
||||
start: number;
|
||||
@ -1515,10 +1519,9 @@ declare namespace ts {
|
||||
const version: string;
|
||||
function findConfigFile(searchPath: string): string;
|
||||
function resolveTripleslashReference(moduleName: string, containingFile: string): string;
|
||||
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModule;
|
||||
function nodeModuleNameResolver(moduleName: string, containingFile: string, host: ModuleResolutionHost): ResolvedModule;
|
||||
function baseUrlModuleNameResolver(moduleName: string, containingFile: string, baseUrl: string, host: ModuleResolutionHost): ResolvedModule;
|
||||
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModule;
|
||||
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function nodeModuleNameResolver(moduleName: string, containingFile: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
|
||||
function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
|
||||
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
|
||||
@ -1530,7 +1533,7 @@ declare namespace ts {
|
||||
* Read tsconfig.json file
|
||||
* @param fileName The path to the config file
|
||||
*/
|
||||
function readConfigFile(fileName: string): {
|
||||
function readConfigFile(fileName: string, readFile: (path: string) => string): {
|
||||
config?: any;
|
||||
error?: Diagnostic;
|
||||
};
|
||||
@ -1649,7 +1652,7 @@ declare namespace ts {
|
||||
trace?(s: string): void;
|
||||
error?(s: string): void;
|
||||
useCaseSensitiveFileNames?(): boolean;
|
||||
resolveModuleNames?(moduleNames: string[], containingFile: string): string[];
|
||||
resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[];
|
||||
}
|
||||
interface LanguageService {
|
||||
cleanupSemanticCache(): void;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
||||
"name": "typescript",
|
||||
"author": "Microsoft Corp.",
|
||||
"homepage": "http://typescriptlang.org/",
|
||||
"version": "1.6.0",
|
||||
"version": "1.7.0",
|
||||
"license": "Apache-2.0",
|
||||
"description": "TypeScript is a language for application scale JavaScript development",
|
||||
"keywords": [
|
||||
@ -35,7 +35,8 @@
|
||||
"browserify": "latest",
|
||||
"istanbul": "latest",
|
||||
"mocha-fivemat-progress-reporter": "latest",
|
||||
"tslint": "latest"
|
||||
"tslint": "latest",
|
||||
"tsd": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"pretest": "jake tests",
|
||||
|
||||
@ -1,125 +0,0 @@
|
||||
declare var require: any, process: any;
|
||||
declare var __dirname: any;
|
||||
|
||||
var fs = require("fs");
|
||||
var path = require("path");
|
||||
var child_process = require('child_process');
|
||||
|
||||
var tscRoot = path.join(__dirname, "..\\");
|
||||
var tscPath = path.join(tscRoot, "built", "instrumented", "tsc.js");
|
||||
var rwcTestPath = path.join(tscRoot, "tests", "cases", "rwc", "dt");
|
||||
var definitelyTypedRoot = process.argv[2];
|
||||
|
||||
function fileExtensionIs(path: string, extension: string): boolean {
|
||||
var pathLen = path.length;
|
||||
var extLen = extension.length;
|
||||
return pathLen > extLen && path.substr(pathLen - extLen, extLen).toLocaleLowerCase() === extension.toLocaleLowerCase();
|
||||
}
|
||||
|
||||
function copyFileSync(source, destination) {
|
||||
var text = fs.readFileSync(source);
|
||||
fs.writeFileSync(destination, text);
|
||||
}
|
||||
|
||||
function importDefinitelyTypedTest(testCaseName: string, testFiles: string[], responseFile: string ) {
|
||||
var cmd = "node " + tscPath + " --module commonjs " + testFiles.join(" ");
|
||||
if (responseFile) cmd += " @" + responseFile;
|
||||
|
||||
var testDirectoryName = testCaseName + "_" + Math.floor((Math.random() * 10000) + 1);
|
||||
var testDirectoryPath = path.join(process.env["temp"], testDirectoryName);
|
||||
if (fs.existsSync(testDirectoryPath)) {
|
||||
throw new Error("Could not create test directory");
|
||||
}
|
||||
fs.mkdirSync(testDirectoryPath);
|
||||
|
||||
child_process.exec(cmd, {
|
||||
maxBuffer: 1 * 1024 * 1024,
|
||||
cwd: testDirectoryPath
|
||||
}, (error, stdout, stderr) => {
|
||||
console.log("importing " + testCaseName + " ...");
|
||||
console.log(cmd);
|
||||
|
||||
if (error) {
|
||||
console.log("importing " + testCaseName + " ...");
|
||||
console.log(cmd);
|
||||
console.log("==> error " + JSON.stringify(error));
|
||||
console.log("==> stdout " + String(stdout));
|
||||
console.log("==> stderr " + String(stderr));
|
||||
console.log("\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
// copy generated file to output location
|
||||
var outputFilePath = path.join(testDirectoryPath, "iocapture0.json");
|
||||
var testCasePath = path.join(rwcTestPath, "DefinitelyTyped_" + testCaseName + ".json");
|
||||
copyFileSync(outputFilePath, testCasePath);
|
||||
|
||||
//console.log("output generated at: " + outputFilePath);
|
||||
|
||||
if (!fs.existsSync(testCasePath)) {
|
||||
throw new Error("could not find test case at: " + testCasePath);
|
||||
}
|
||||
else {
|
||||
fs.unlinkSync(outputFilePath);
|
||||
fs.rmdirSync(testDirectoryPath);
|
||||
//console.log("testcase generated at: " + testCasePath);
|
||||
//console.log("Done.");
|
||||
}
|
||||
//console.log("\r\n");
|
||||
|
||||
})
|
||||
.on('error', function (error) {
|
||||
console.log("==> error " + JSON.stringify(error));
|
||||
console.log("\r\n");
|
||||
});
|
||||
}
|
||||
|
||||
function importDefinitelyTypedTests(definitelyTypedRoot: string): void {
|
||||
fs.readdir(definitelyTypedRoot, (err, subDirectorys) => {
|
||||
if (err) throw err;
|
||||
|
||||
subDirectorys
|
||||
.filter(d => ["_infrastructure", "node_modules", ".git"].indexOf(d) < 0)
|
||||
.filter(i => i.indexOf("sipml") >=0 )
|
||||
.filter(i => fs.statSync(path.join(definitelyTypedRoot, i)).isDirectory())
|
||||
.forEach(d => {
|
||||
var directoryPath = path.join(definitelyTypedRoot, d);
|
||||
fs.readdir(directoryPath, function (err, files) {
|
||||
if (err) throw err;
|
||||
|
||||
var tsFiles = [];
|
||||
var testFiles = [];
|
||||
var paramFile;
|
||||
|
||||
files
|
||||
.map(f => path.join(directoryPath, f))
|
||||
.forEach(f => {
|
||||
if (fileExtensionIs(f, ".ts")) tsFiles.push(f);
|
||||
else if (fileExtensionIs(f, ".tscparams")) paramFile = f;
|
||||
|
||||
if (fileExtensionIs(f, "-tests.ts")) testFiles.push(f);
|
||||
});
|
||||
|
||||
if (testFiles.length === 0) {
|
||||
// no test files but multiple d.ts's, e.g. winjs
|
||||
var regexp = new RegExp(d + "(([-][0-9])|([\.]d[\.]ts))");
|
||||
if (tsFiles.length > 1 && tsFiles.every(t => fileExtensionIs(t, ".d.ts") && regexp.test(t))) {
|
||||
tsFiles.forEach(filename => {
|
||||
importDefinitelyTypedTest(path.basename(filename, ".d.ts"), [filename], paramFile);
|
||||
});
|
||||
}
|
||||
else {
|
||||
importDefinitelyTypedTest(d, tsFiles, paramFile);
|
||||
}
|
||||
}
|
||||
else {
|
||||
testFiles.forEach(filename => {
|
||||
importDefinitelyTypedTest(path.basename(filename, "-tests.ts"), [filename], paramFile);
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
importDefinitelyTypedTests(definitelyTypedRoot);
|
||||
161
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.ts
Normal file
161
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.ts
Normal file
@ -0,0 +1,161 @@
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
import * as child_process from "child_process";
|
||||
|
||||
|
||||
interface Map<T> {
|
||||
[key: string]: T;
|
||||
}
|
||||
|
||||
declare var process: {
|
||||
argv: string[];
|
||||
env: Map<string>;
|
||||
exit(exitCode?: number): void;
|
||||
}
|
||||
|
||||
main();
|
||||
function main() {
|
||||
const [, progName, tscRoot, definitelyTypedRoot] = process.argv;
|
||||
if (process.argv.length !== 4) {
|
||||
if (process.argv.length < 2) {
|
||||
throw "Expected at least 2 argv elements."
|
||||
}
|
||||
console.log("Usage:")
|
||||
console.log(` node ${path.relative(__dirname, progName)} [TypeScript Repo Root] [DefinitelyTyped Repo Root]`);
|
||||
return;
|
||||
}
|
||||
|
||||
const tscPath = path.resolve(tscRoot, "built", "local", "tsc.js");
|
||||
const rwcTestPath = path.resolve(tscRoot, "internal", "cases", "rwc");
|
||||
const resolvedDefinitelyTypedRoot = path.resolve(definitelyTypedRoot);
|
||||
|
||||
console.log(`Resolved TypeScript Compiler Path: '${tscPath}'.`);
|
||||
console.log(`Resolved TypeScript RWC Path: '${rwcTestPath}'.`);
|
||||
console.log(`Resolved DefinitelyTyped Repo Root: '${resolvedDefinitelyTypedRoot}'.`);
|
||||
importDefinitelyTypedTests(tscPath, rwcTestPath, resolvedDefinitelyTypedRoot);
|
||||
}
|
||||
|
||||
function filePathEndsWith(path: string, endingString: string): boolean {
|
||||
const pathLen = path.length;
|
||||
const extLen = endingString.length;
|
||||
return pathLen > extLen && path.substr(pathLen - extLen, extLen).toLocaleLowerCase() === endingString.toLocaleLowerCase();
|
||||
}
|
||||
|
||||
function copyFileSync(source: string, destination: string) {
|
||||
let text = fs.readFileSync(source);
|
||||
fs.writeFileSync(destination, text);
|
||||
}
|
||||
|
||||
function importDefinitelyTypedTest(tscPath: string, rwcTestPath: string, testCaseName: string, testFiles: string[], responseFile: string ) {
|
||||
let cmd = "node " + tscPath + " --module commonjs " + testFiles.join(" ");
|
||||
if (responseFile) {
|
||||
cmd += " @" + responseFile;
|
||||
}
|
||||
|
||||
let testDirectoryName = testCaseName + "_" + Math.floor((Math.random() * 10000) + 1);
|
||||
let testDirectoryPath = path.join(process.env["temp"], testDirectoryName);
|
||||
if (fs.existsSync(testDirectoryPath)) {
|
||||
throw new Error("Could not create test directory");
|
||||
}
|
||||
fs.mkdirSync(testDirectoryPath);
|
||||
|
||||
child_process.exec(cmd, {
|
||||
maxBuffer: 1 * 1024 * 1024,
|
||||
cwd: testDirectoryPath
|
||||
}, (error, stdout, stderr) => {
|
||||
console.log("importing " + testCaseName + " ...");
|
||||
console.log(cmd);
|
||||
|
||||
if (error) {
|
||||
console.log("importing " + testCaseName + " ...");
|
||||
console.log(cmd);
|
||||
console.log("==> error " + JSON.stringify(error));
|
||||
console.log("==> stdout " + String(stdout));
|
||||
console.log("==> stderr " + String(stderr));
|
||||
console.log("\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
// copy generated file to output location
|
||||
let outputFilePath = path.join(testDirectoryPath, "iocapture0.json");
|
||||
let testCasePath = path.join(rwcTestPath, "DefinitelyTyped_" + testCaseName + ".json");
|
||||
copyFileSync(outputFilePath, testCasePath);
|
||||
|
||||
//console.log("output generated at: " + outputFilePath);
|
||||
|
||||
if (!fs.existsSync(testCasePath)) {
|
||||
throw new Error("could not find test case at: " + testCasePath);
|
||||
}
|
||||
else {
|
||||
fs.unlinkSync(outputFilePath);
|
||||
fs.rmdirSync(testDirectoryPath);
|
||||
//console.log("testcase generated at: " + testCasePath);
|
||||
//console.log("Done.");
|
||||
}
|
||||
//console.log("\r\n");
|
||||
|
||||
})
|
||||
.on('error', (error: any) => {
|
||||
console.log("==> error " + JSON.stringify(error));
|
||||
console.log("\r\n");
|
||||
});
|
||||
}
|
||||
|
||||
function importDefinitelyTypedTests(tscPath: string, rwcTestPath: string, definitelyTypedRoot: string): void {
|
||||
fs.readdir(definitelyTypedRoot, (err, subDirectories) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
// When you just want to test the script out on one or two files,
|
||||
// just add a line like the following:
|
||||
//
|
||||
// .filter(d => d.indexOf("sipml") >= 0 )
|
||||
subDirectories
|
||||
.filter(d => ["_infrastructure", "node_modules", ".git"].indexOf(d) < 0)
|
||||
.filter(i => fs.statSync(path.join(definitelyTypedRoot, i)).isDirectory())
|
||||
.forEach(d => {
|
||||
const directoryPath = path.join(definitelyTypedRoot, d);
|
||||
fs.readdir(directoryPath, function (err, files) {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
let tsFiles: string[] = [];
|
||||
let testFiles: string[] = [];
|
||||
let paramFile: string;
|
||||
|
||||
for (const filePath of files.map(f => path.join(directoryPath, f))) {
|
||||
if (filePathEndsWith(filePath, ".ts")) {
|
||||
tsFiles.push(filePath);
|
||||
|
||||
if (filePathEndsWith(filePath, "-tests.ts")) {
|
||||
testFiles.push(filePath);
|
||||
}
|
||||
}
|
||||
else if (filePathEndsWith(filePath, ".tscparams")) {
|
||||
paramFile = filePath;
|
||||
}
|
||||
}
|
||||
|
||||
if (testFiles.length === 0) {
|
||||
// no test files but multiple d.ts's, e.g. winjs
|
||||
const regexp = new RegExp(d + "(([-][0-9])|([\.]d[\.]ts))");
|
||||
if (tsFiles.length > 1 && tsFiles.every(t => filePathEndsWith(t, ".d.ts") && regexp.test(t))) {
|
||||
for (const fileName of tsFiles) {
|
||||
importDefinitelyTypedTest(tscPath, rwcTestPath, path.basename(fileName, ".d.ts"), [fileName], paramFile);
|
||||
}
|
||||
}
|
||||
else {
|
||||
importDefinitelyTypedTest(tscPath, rwcTestPath, d, tsFiles, paramFile);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (const fileName of tsFiles) {
|
||||
importDefinitelyTypedTest(tscPath, rwcTestPath, path.basename(fileName, "-tests.ts"), [fileName], paramFile);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
16
scripts/importDefinitelyTypedTests/tsconfig.json
Normal file
16
scripts/importDefinitelyTypedTests/tsconfig.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "ES5",
|
||||
"noImplicitAny": true,
|
||||
"outDir": "./",
|
||||
"rootDir": ".",
|
||||
"sourceMap": false
|
||||
},
|
||||
"files": [
|
||||
"../typings/node/node.d.ts",
|
||||
"importDefinitelyTypedTests.ts"
|
||||
],
|
||||
"exclude": [
|
||||
]
|
||||
}
|
||||
@ -10,10 +10,6 @@ interface InputDiagnosticMessageTable {
|
||||
[msg: string]: DiagnosticDetails;
|
||||
}
|
||||
|
||||
interface IIndexable<V> {
|
||||
[key: string]: V;
|
||||
}
|
||||
|
||||
function main(): void {
|
||||
var sys = ts.sys;
|
||||
if (sys.args.length < 1) {
|
||||
@ -25,21 +21,49 @@ function main(): void {
|
||||
var inputFilePath = sys.args[0].replace(/\\/g, "/");
|
||||
var inputStr = sys.readFile(inputFilePath);
|
||||
|
||||
var diagnosticMesages: InputDiagnosticMessageTable = JSON.parse(inputStr);
|
||||
var diagnosticMessages: InputDiagnosticMessageTable = JSON.parse(inputStr);
|
||||
|
||||
var names = Utilities.getObjectKeys(diagnosticMesages);
|
||||
var names = Utilities.getObjectKeys(diagnosticMessages);
|
||||
var nameMap = buildUniqueNameMap(names);
|
||||
|
||||
var infoFileOutput = buildInfoFileOutput(diagnosticMesages, nameMap);
|
||||
|
||||
var infoFileOutput = buildInfoFileOutput(diagnosticMessages, nameMap);
|
||||
checkForUniqueCodes(names, diagnosticMessages);
|
||||
|
||||
// TODO: Fix path joining
|
||||
var inputDirectory = inputFilePath.substr(0,inputFilePath.lastIndexOf("/"));
|
||||
var fileOutputPath = inputDirectory + "/diagnosticInformationMap.generated.ts";
|
||||
sys.writeFile(fileOutputPath, infoFileOutput);
|
||||
}
|
||||
|
||||
function buildUniqueNameMap(names: string[]): IIndexable<string> {
|
||||
var nameMap: IIndexable<string> = {};
|
||||
function checkForUniqueCodes(messages: string[], diagnosticTable: InputDiagnosticMessageTable) {
|
||||
const originalMessageForCode: string[] = [];
|
||||
let numConflicts = 0;
|
||||
|
||||
for (const currentMessage of messages) {
|
||||
const code = diagnosticTable[currentMessage].code;
|
||||
|
||||
if (code in originalMessageForCode) {
|
||||
const originalMessage = originalMessageForCode[code];
|
||||
ts.sys.write("\x1b[91m"); // High intensity red.
|
||||
ts.sys.write("Error");
|
||||
ts.sys.write("\x1b[0m"); // Reset formatting.
|
||||
ts.sys.write(`: Diagnostic code '${code}' conflicts between "${originalMessage}" and "${currentMessage}".`);
|
||||
ts.sys.write(ts.sys.newLine + ts.sys.newLine);
|
||||
|
||||
numConflicts++;
|
||||
}
|
||||
else {
|
||||
originalMessageForCode[code] = currentMessage;
|
||||
}
|
||||
}
|
||||
|
||||
if (numConflicts > 0) {
|
||||
throw new Error(`Found ${numConflicts} conflict(s) in diagnostic codes.`);
|
||||
}
|
||||
}
|
||||
|
||||
function buildUniqueNameMap(names: string[]): ts.Map<string> {
|
||||
var nameMap: ts.Map<string> = {};
|
||||
|
||||
var uniqueNames = NameGenerator.ensureUniqueness(names, /* isCaseSensitive */ false, /* isFixed */ undefined);
|
||||
|
||||
@ -50,7 +74,7 @@ function buildUniqueNameMap(names: string[]): IIndexable<string> {
|
||||
return nameMap;
|
||||
}
|
||||
|
||||
function buildInfoFileOutput(messageTable: InputDiagnosticMessageTable, nameMap: IIndexable<string>): string {
|
||||
function buildInfoFileOutput(messageTable: InputDiagnosticMessageTable, nameMap: ts.Map<string>): string {
|
||||
var result =
|
||||
'// <auto-generated />\r\n' +
|
||||
'/// <reference path="types.ts" />\r\n' +
|
||||
@ -172,7 +196,7 @@ module Utilities {
|
||||
}
|
||||
|
||||
// Like Object.keys
|
||||
export function getObjectKeys(obj: any): string[]{
|
||||
export function getObjectKeys(obj: any): string[] {
|
||||
var result: string[] = [];
|
||||
|
||||
for (var name in obj) {
|
||||
|
||||
12
scripts/tsd.json
Normal file
12
scripts/tsd.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": "v4",
|
||||
"repo": "borisyankov/DefinitelyTyped",
|
||||
"ref": "master",
|
||||
"path": "typings",
|
||||
"bundle": "typings/tsd.d.ts",
|
||||
"installed": {
|
||||
"node/node.d.ts": {
|
||||
"commit": "5f480287834a2615274eea31574b713e64decf17"
|
||||
}
|
||||
}
|
||||
}
|
||||
50
scripts/tslint/booleanTriviaRule.ts
Normal file
50
scripts/tslint/booleanTriviaRule.ts
Normal file
@ -0,0 +1,50 @@
|
||||
/// <reference path="../../node_modules/tslint/typings/typescriptServices.d.ts" />
|
||||
/// <reference path="../../node_modules/tslint/lib/tslint.d.ts" />
|
||||
|
||||
|
||||
export class Rule extends Lint.Rules.AbstractRule {
|
||||
public static FAILURE_STRING_FACTORY = (name: string, currently: string) => `Tag boolean argument as '${name}' (currently '${currently}')`;
|
||||
|
||||
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
|
||||
const program = ts.createProgram([sourceFile.fileName], Lint.createCompilerOptions());
|
||||
const checker = program.getTypeChecker();
|
||||
return this.applyWithWalker(new BooleanTriviaWalker(checker, program.getSourceFile(sourceFile.fileName), this.getOptions()));
|
||||
}
|
||||
}
|
||||
|
||||
class BooleanTriviaWalker extends Lint.RuleWalker {
|
||||
constructor(private checker: ts.TypeChecker, file: ts.SourceFile, opts: Lint.IOptions) {
|
||||
super(file, opts);
|
||||
}
|
||||
|
||||
visitCallExpression(node: ts.CallExpression) {
|
||||
super.visitCallExpression(node);
|
||||
if (node.arguments) {
|
||||
const targetCallSignature = this.checker.getResolvedSignature(node);
|
||||
if (!!targetCallSignature) {
|
||||
const targetParameters = targetCallSignature.getParameters();
|
||||
const source = this.getSourceFile();
|
||||
for (let index = 0; index < targetParameters.length; index++) {
|
||||
const param = targetParameters[index];
|
||||
const arg = node.arguments[index];
|
||||
if (!(arg && param)) continue;
|
||||
|
||||
const argType = this.checker.getContextualType(arg);
|
||||
if (argType && (argType.getFlags() & ts.TypeFlags.Boolean)) {
|
||||
if (arg.kind !== ts.SyntaxKind.TrueKeyword && arg.kind !== ts.SyntaxKind.FalseKeyword) {
|
||||
continue;
|
||||
}
|
||||
let triviaContent: string;
|
||||
const ranges = ts.getLeadingCommentRanges(arg.getFullText(), 0);
|
||||
if (ranges && ranges.length === 1 && ranges[0].kind === ts.SyntaxKind.MultiLineCommentTrivia) {
|
||||
triviaContent = arg.getFullText().slice(ranges[0].pos + 2, ranges[0].end - 2); //+/-2 to remove /**/
|
||||
}
|
||||
if (triviaContent !== param.getName()) {
|
||||
this.addFailure(this.createFailure(arg.getStart(source), arg.getWidth(source), Rule.FAILURE_STRING_FACTORY(param.getName(), triviaContent)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
61
scripts/tslint/nextLineRule.ts
Normal file
61
scripts/tslint/nextLineRule.ts
Normal file
@ -0,0 +1,61 @@
|
||||
/// <reference path="../../node_modules/tslint/typings/typescriptServices.d.ts" />
|
||||
/// <reference path="../../node_modules/tslint/lib/tslint.d.ts" />
|
||||
|
||||
const OPTION_CATCH = "check-catch";
|
||||
const OPTION_ELSE = "check-else";
|
||||
|
||||
export class Rule extends Lint.Rules.AbstractRule {
|
||||
public static CATCH_FAILURE_STRING = "'catch' should be on the line following the previous block's ending curly brace";
|
||||
public static ELSE_FAILURE_STRING = "'else' should be on the line following the previous block's ending curly brace";
|
||||
|
||||
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
|
||||
return this.applyWithWalker(new NextLineWalker(sourceFile, this.getOptions()));
|
||||
}
|
||||
}
|
||||
|
||||
class NextLineWalker extends Lint.RuleWalker {
|
||||
public visitIfStatement(node: ts.IfStatement) {
|
||||
const sourceFile = node.getSourceFile();
|
||||
const thenStatement = node.thenStatement;
|
||||
|
||||
const elseStatement = node.elseStatement;
|
||||
if (!!elseStatement) {
|
||||
// find the else keyword
|
||||
const elseKeyword = getFirstChildOfKind(node, ts.SyntaxKind.ElseKeyword);
|
||||
if (this.hasOption(OPTION_ELSE) && !!elseKeyword) {
|
||||
const thenStatementEndLoc = sourceFile.getLineAndCharacterOfPosition(thenStatement.getEnd());
|
||||
const elseKeywordLoc = sourceFile.getLineAndCharacterOfPosition(elseKeyword.getStart(sourceFile));
|
||||
if (thenStatementEndLoc.line !== (elseKeywordLoc.line - 1)) {
|
||||
const failure = this.createFailure(elseKeyword.getStart(sourceFile), elseKeyword.getWidth(sourceFile), Rule.ELSE_FAILURE_STRING);
|
||||
this.addFailure(failure);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
super.visitIfStatement(node);
|
||||
}
|
||||
|
||||
public visitTryStatement(node: ts.TryStatement) {
|
||||
const sourceFile = node.getSourceFile();
|
||||
const catchClause = node.catchClause;
|
||||
|
||||
// "visit" try block
|
||||
const tryBlock = node.tryBlock;
|
||||
|
||||
if (this.hasOption(OPTION_CATCH) && !!catchClause) {
|
||||
const tryClosingBrace = tryBlock.getLastToken(sourceFile);
|
||||
const catchKeyword = catchClause.getFirstToken(sourceFile);
|
||||
const tryClosingBraceLoc = sourceFile.getLineAndCharacterOfPosition(tryClosingBrace.getEnd());
|
||||
const catchKeywordLoc = sourceFile.getLineAndCharacterOfPosition(catchKeyword.getStart(sourceFile));
|
||||
if (tryClosingBraceLoc.line !== (catchKeywordLoc.line - 1)) {
|
||||
const failure = this.createFailure(catchKeyword.getStart(sourceFile), catchKeyword.getWidth(sourceFile), Rule.CATCH_FAILURE_STRING);
|
||||
this.addFailure(failure);
|
||||
}
|
||||
}
|
||||
super.visitTryStatement(node);
|
||||
}
|
||||
}
|
||||
|
||||
function getFirstChildOfKind(node: ts.Node, kind: ts.SyntaxKind) {
|
||||
return node.getChildren().filter((child) => child.kind === kind)[0];
|
||||
}
|
||||
49
scripts/tslint/noInferrableTypesRule.ts
Normal file
49
scripts/tslint/noInferrableTypesRule.ts
Normal file
@ -0,0 +1,49 @@
|
||||
/// <reference path="../../node_modules/tslint/typings/typescriptServices.d.ts" />
|
||||
/// <reference path="../../node_modules/tslint/lib/tslint.d.ts" />
|
||||
|
||||
|
||||
export class Rule extends Lint.Rules.AbstractRule {
|
||||
public static FAILURE_STRING_FACTORY = (type: string) => `LHS type (${type}) inferred by RHS expression, remove type annotation`;
|
||||
|
||||
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
|
||||
return this.applyWithWalker(new InferrableTypeWalker(sourceFile, this.getOptions()));
|
||||
}
|
||||
}
|
||||
|
||||
class InferrableTypeWalker extends Lint.RuleWalker {
|
||||
visitVariableStatement(node: ts.VariableStatement) {
|
||||
node.declarationList.declarations.forEach(e => {
|
||||
if ((!!e.type) && (!!e.initializer)) {
|
||||
let failure: string;
|
||||
switch (e.type.kind) {
|
||||
case ts.SyntaxKind.BooleanKeyword:
|
||||
if (e.initializer.kind === ts.SyntaxKind.TrueKeyword || e.initializer.kind === ts.SyntaxKind.FalseKeyword) {
|
||||
failure = 'boolean';
|
||||
}
|
||||
break;
|
||||
case ts.SyntaxKind.NumberKeyword:
|
||||
if (e.initializer.kind === ts.SyntaxKind.NumericLiteral) {
|
||||
failure = 'number';
|
||||
}
|
||||
break;
|
||||
case ts.SyntaxKind.StringKeyword:
|
||||
switch (e.initializer.kind) {
|
||||
case ts.SyntaxKind.StringLiteral:
|
||||
case ts.SyntaxKind.NoSubstitutionTemplateLiteral:
|
||||
case ts.SyntaxKind.TemplateExpression:
|
||||
failure = 'string';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (failure) {
|
||||
this.addFailure(this.createFailure(e.type.getStart(), e.type.getWidth(), Rule.FAILURE_STRING_FACTORY(failure)));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
super.visitVariableStatement(node);
|
||||
}
|
||||
}
|
||||
20
scripts/tslint/noNullRule.ts
Normal file
20
scripts/tslint/noNullRule.ts
Normal file
@ -0,0 +1,20 @@
|
||||
/// <reference path="../../node_modules/tslint/typings/typescriptServices.d.ts" />
|
||||
/// <reference path="../../node_modules/tslint/lib/tslint.d.ts" />
|
||||
|
||||
|
||||
export class Rule extends Lint.Rules.AbstractRule {
|
||||
public static FAILURE_STRING = "Don't use the 'null' keyword - use 'undefined' for missing values instead";
|
||||
|
||||
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
|
||||
return this.applyWithWalker(new NullWalker(sourceFile, this.getOptions()));
|
||||
}
|
||||
}
|
||||
|
||||
class NullWalker extends Lint.RuleWalker {
|
||||
visitNode(node: ts.Node) {
|
||||
super.visitNode(node);
|
||||
if (node.kind === ts.SyntaxKind.NullKeyword) {
|
||||
this.addFailure(this.createFailure(node.getStart(), node.getWidth(), Rule.FAILURE_STRING));
|
||||
}
|
||||
}
|
||||
}
|
||||
7
scripts/tslint/tsconfig.json
Normal file
7
scripts/tslint/tsconfig.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"noImplicitAny": true,
|
||||
"module": "commonjs",
|
||||
"outDir": "../../built/local/tslint"
|
||||
}
|
||||
}
|
||||
@ -6575,8 +6575,8 @@ namespace ts {
|
||||
|
||||
// Return contextual type of parameter or undefined if no contextual type is available
|
||||
function getContextuallyTypedParameterType(parameter: ParameterDeclaration): Type {
|
||||
if (isFunctionExpressionOrArrowFunction(parameter.parent)) {
|
||||
let func = <FunctionExpression>parameter.parent;
|
||||
let func = parameter.parent;
|
||||
if (isFunctionExpressionOrArrowFunction(func) || isObjectLiteralMethod(func)) {
|
||||
if (isContextSensitive(func)) {
|
||||
let contextualSignature = getContextualSignature(func);
|
||||
if (contextualSignature) {
|
||||
@ -6908,7 +6908,7 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
function isFunctionExpressionOrArrowFunction(node: Node): boolean {
|
||||
function isFunctionExpressionOrArrowFunction(node: Node): node is FunctionExpression {
|
||||
return node.kind === SyntaxKind.FunctionExpression || node.kind === SyntaxKind.ArrowFunction;
|
||||
}
|
||||
|
||||
@ -6927,8 +6927,8 @@ namespace ts {
|
||||
function getContextualSignature(node: FunctionExpression | MethodDeclaration): Signature {
|
||||
Debug.assert(node.kind !== SyntaxKind.MethodDeclaration || isObjectLiteralMethod(node));
|
||||
let type = isObjectLiteralMethod(node)
|
||||
? getContextualTypeForObjectLiteralMethod(<MethodDeclaration>node)
|
||||
: getContextualType(<FunctionExpression>node);
|
||||
? getContextualTypeForObjectLiteralMethod(node)
|
||||
: getContextualType(node);
|
||||
if (!type) {
|
||||
return undefined;
|
||||
}
|
||||
@ -13657,7 +13657,7 @@ namespace ts {
|
||||
forEach(node.decorators, checkFunctionAndClassExpressionBodies);
|
||||
forEach((<MethodDeclaration>node).parameters, checkFunctionAndClassExpressionBodies);
|
||||
if (isObjectLiteralMethod(node)) {
|
||||
checkFunctionExpressionOrObjectLiteralMethodBody(<MethodDeclaration>node);
|
||||
checkFunctionExpressionOrObjectLiteralMethodBody(node);
|
||||
}
|
||||
break;
|
||||
case SyntaxKind.Constructor:
|
||||
@ -14255,7 +14255,10 @@ namespace ts {
|
||||
let symbols: Symbol[] = [];
|
||||
let name = symbol.name;
|
||||
forEach(getSymbolLinks(symbol).containingType.types, t => {
|
||||
symbols.push(getPropertyOfType(t, name));
|
||||
let symbol = getPropertyOfType(t, name);
|
||||
if (symbol) {
|
||||
symbols.push(symbol);
|
||||
}
|
||||
});
|
||||
return symbols;
|
||||
}
|
||||
|
||||
@ -244,8 +244,9 @@ namespace ts {
|
||||
"node": ModuleResolutionKind.NodeJs,
|
||||
"classic": ModuleResolutionKind.Classic
|
||||
},
|
||||
description: Diagnostics.Specifies_module_resolution_strategy_Colon_node_Node_or_classic_TypeScript_pre_1_6
|
||||
}
|
||||
description: Diagnostics.Specifies_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6,
|
||||
error: Diagnostics.Argument_for_moduleResolution_option_must_be_node_or_classic,
|
||||
}
|
||||
];
|
||||
|
||||
/* @internal */
|
||||
@ -328,7 +329,7 @@ namespace ts {
|
||||
options[opt.name] = map[key];
|
||||
}
|
||||
else {
|
||||
errors.push(createCompilerDiagnostic(opt.error));
|
||||
errors.push(createCompilerDiagnostic((<CommandLineOptionOfCustomType>opt).error));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -441,7 +442,7 @@ namespace ts {
|
||||
value = optType[key];
|
||||
}
|
||||
else {
|
||||
errors.push(createCompilerDiagnostic(opt.error));
|
||||
errors.push(createCompilerDiagnostic((<CommandLineOptionOfCustomType>opt).error));
|
||||
value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,621 +0,0 @@
|
||||
// <auto-generated />
|
||||
/// <reference path="types.ts" />
|
||||
/* @internal */
|
||||
namespace ts {
|
||||
export var Diagnostics = {
|
||||
Unterminated_string_literal: { code: 1002, category: DiagnosticCategory.Error, key: "Unterminated string literal." },
|
||||
Identifier_expected: { code: 1003, category: DiagnosticCategory.Error, key: "Identifier expected." },
|
||||
_0_expected: { code: 1005, category: DiagnosticCategory.Error, key: "'{0}' expected." },
|
||||
A_file_cannot_have_a_reference_to_itself: { code: 1006, category: DiagnosticCategory.Error, key: "A file cannot have a reference to itself." },
|
||||
Trailing_comma_not_allowed: { code: 1009, category: DiagnosticCategory.Error, key: "Trailing comma not allowed." },
|
||||
Asterisk_Slash_expected: { code: 1010, category: DiagnosticCategory.Error, key: "'*/' expected." },
|
||||
Unexpected_token: { code: 1012, category: DiagnosticCategory.Error, key: "Unexpected token." },
|
||||
A_rest_parameter_must_be_last_in_a_parameter_list: { code: 1014, category: DiagnosticCategory.Error, key: "A rest parameter must be last in a parameter list." },
|
||||
Parameter_cannot_have_question_mark_and_initializer: { code: 1015, category: DiagnosticCategory.Error, key: "Parameter cannot have question mark and initializer." },
|
||||
A_required_parameter_cannot_follow_an_optional_parameter: { code: 1016, category: DiagnosticCategory.Error, key: "A required parameter cannot follow an optional parameter." },
|
||||
An_index_signature_cannot_have_a_rest_parameter: { code: 1017, category: DiagnosticCategory.Error, key: "An index signature cannot have a rest parameter." },
|
||||
An_index_signature_parameter_cannot_have_an_accessibility_modifier: { code: 1018, category: DiagnosticCategory.Error, key: "An index signature parameter cannot have an accessibility modifier." },
|
||||
An_index_signature_parameter_cannot_have_a_question_mark: { code: 1019, category: DiagnosticCategory.Error, key: "An index signature parameter cannot have a question mark." },
|
||||
An_index_signature_parameter_cannot_have_an_initializer: { code: 1020, category: DiagnosticCategory.Error, key: "An index signature parameter cannot have an initializer." },
|
||||
An_index_signature_must_have_a_type_annotation: { code: 1021, category: DiagnosticCategory.Error, key: "An index signature must have a type annotation." },
|
||||
An_index_signature_parameter_must_have_a_type_annotation: { code: 1022, category: DiagnosticCategory.Error, key: "An index signature parameter must have a type annotation." },
|
||||
An_index_signature_parameter_type_must_be_string_or_number: { code: 1023, category: DiagnosticCategory.Error, key: "An index signature parameter type must be 'string' or 'number'." },
|
||||
Accessibility_modifier_already_seen: { code: 1028, category: DiagnosticCategory.Error, key: "Accessibility modifier already seen." },
|
||||
_0_modifier_must_precede_1_modifier: { code: 1029, category: DiagnosticCategory.Error, key: "'{0}' modifier must precede '{1}' modifier." },
|
||||
_0_modifier_already_seen: { code: 1030, category: DiagnosticCategory.Error, key: "'{0}' modifier already seen." },
|
||||
_0_modifier_cannot_appear_on_a_class_element: { code: 1031, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a class element." },
|
||||
super_must_be_followed_by_an_argument_list_or_member_access: { code: 1034, category: DiagnosticCategory.Error, key: "'super' must be followed by an argument list or member access." },
|
||||
Only_ambient_modules_can_use_quoted_names: { code: 1035, category: DiagnosticCategory.Error, key: "Only ambient modules can use quoted names." },
|
||||
Statements_are_not_allowed_in_ambient_contexts: { code: 1036, category: DiagnosticCategory.Error, key: "Statements are not allowed in ambient contexts." },
|
||||
A_declare_modifier_cannot_be_used_in_an_already_ambient_context: { code: 1038, category: DiagnosticCategory.Error, key: "A 'declare' modifier cannot be used in an already ambient context." },
|
||||
Initializers_are_not_allowed_in_ambient_contexts: { code: 1039, category: DiagnosticCategory.Error, key: "Initializers are not allowed in ambient contexts." },
|
||||
_0_modifier_cannot_be_used_in_an_ambient_context: { code: 1040, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used in an ambient context." },
|
||||
_0_modifier_cannot_be_used_with_a_class_declaration: { code: 1041, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used with a class declaration." },
|
||||
_0_modifier_cannot_be_used_here: { code: 1042, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used here." },
|
||||
_0_modifier_cannot_appear_on_a_data_property: { code: 1043, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a data property." },
|
||||
_0_modifier_cannot_appear_on_a_module_element: { code: 1044, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a module element." },
|
||||
A_0_modifier_cannot_be_used_with_an_interface_declaration: { code: 1045, category: DiagnosticCategory.Error, key: "A '{0}' modifier cannot be used with an interface declaration." },
|
||||
A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file: { code: 1046, category: DiagnosticCategory.Error, key: "A 'declare' modifier is required for a top level declaration in a .d.ts file." },
|
||||
A_rest_parameter_cannot_be_optional: { code: 1047, category: DiagnosticCategory.Error, key: "A rest parameter cannot be optional." },
|
||||
A_rest_parameter_cannot_have_an_initializer: { code: 1048, category: DiagnosticCategory.Error, key: "A rest parameter cannot have an initializer." },
|
||||
A_set_accessor_must_have_exactly_one_parameter: { code: 1049, category: DiagnosticCategory.Error, key: "A 'set' accessor must have exactly one parameter." },
|
||||
A_set_accessor_cannot_have_an_optional_parameter: { code: 1051, category: DiagnosticCategory.Error, key: "A 'set' accessor cannot have an optional parameter." },
|
||||
A_set_accessor_parameter_cannot_have_an_initializer: { code: 1052, category: DiagnosticCategory.Error, key: "A 'set' accessor parameter cannot have an initializer." },
|
||||
A_set_accessor_cannot_have_rest_parameter: { code: 1053, category: DiagnosticCategory.Error, key: "A 'set' accessor cannot have rest parameter." },
|
||||
A_get_accessor_cannot_have_parameters: { code: 1054, category: DiagnosticCategory.Error, key: "A 'get' accessor cannot have parameters." },
|
||||
Type_0_is_not_a_valid_async_function_return_type: { code: 1055, category: DiagnosticCategory.Error, key: "Type '{0}' is not a valid async function return type." },
|
||||
Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: DiagnosticCategory.Error, key: "Accessors are only available when targeting ECMAScript 5 and higher." },
|
||||
An_async_function_or_method_must_have_a_valid_awaitable_return_type: { code: 1057, category: DiagnosticCategory.Error, key: "An async function or method must have a valid awaitable return type." },
|
||||
Operand_for_await_does_not_have_a_valid_callable_then_member: { code: 1058, category: DiagnosticCategory.Error, key: "Operand for 'await' does not have a valid callable 'then' member." },
|
||||
Return_expression_in_async_function_does_not_have_a_valid_callable_then_member: { code: 1059, category: DiagnosticCategory.Error, key: "Return expression in async function does not have a valid callable 'then' member." },
|
||||
Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member: { code: 1060, category: DiagnosticCategory.Error, key: "Expression body for async arrow function does not have a valid callable 'then' member." },
|
||||
Enum_member_must_have_initializer: { code: 1061, category: DiagnosticCategory.Error, key: "Enum member must have initializer." },
|
||||
_0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: { code: 1062, category: DiagnosticCategory.Error, key: "{0} is referenced directly or indirectly in the fulfillment callback of its own 'then' method." },
|
||||
An_export_assignment_cannot_be_used_in_a_namespace: { code: 1063, category: DiagnosticCategory.Error, key: "An export assignment cannot be used in a namespace." },
|
||||
Ambient_enum_elements_can_only_have_integer_literal_initializers: { code: 1066, category: DiagnosticCategory.Error, key: "Ambient enum elements can only have integer literal initializers." },
|
||||
Unexpected_token_A_constructor_method_accessor_or_property_was_expected: { code: 1068, category: DiagnosticCategory.Error, key: "Unexpected token. A constructor, method, accessor, or property was expected." },
|
||||
A_0_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: DiagnosticCategory.Error, key: "A '{0}' modifier cannot be used with an import declaration." },
|
||||
Invalid_reference_directive_syntax: { code: 1084, category: DiagnosticCategory.Error, key: "Invalid 'reference' directive syntax." },
|
||||
Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: DiagnosticCategory.Error, key: "Octal literals are not available when targeting ECMAScript 5 and higher." },
|
||||
An_accessor_cannot_be_declared_in_an_ambient_context: { code: 1086, category: DiagnosticCategory.Error, key: "An accessor cannot be declared in an ambient context." },
|
||||
_0_modifier_cannot_appear_on_a_constructor_declaration: { code: 1089, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a constructor declaration." },
|
||||
_0_modifier_cannot_appear_on_a_parameter: { code: 1090, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a parameter." },
|
||||
Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: { code: 1091, category: DiagnosticCategory.Error, key: "Only a single variable declaration is allowed in a 'for...in' statement." },
|
||||
Type_parameters_cannot_appear_on_a_constructor_declaration: { code: 1092, category: DiagnosticCategory.Error, key: "Type parameters cannot appear on a constructor declaration." },
|
||||
Type_annotation_cannot_appear_on_a_constructor_declaration: { code: 1093, category: DiagnosticCategory.Error, key: "Type annotation cannot appear on a constructor declaration." },
|
||||
An_accessor_cannot_have_type_parameters: { code: 1094, category: DiagnosticCategory.Error, key: "An accessor cannot have type parameters." },
|
||||
A_set_accessor_cannot_have_a_return_type_annotation: { code: 1095, category: DiagnosticCategory.Error, key: "A 'set' accessor cannot have a return type annotation." },
|
||||
An_index_signature_must_have_exactly_one_parameter: { code: 1096, category: DiagnosticCategory.Error, key: "An index signature must have exactly one parameter." },
|
||||
_0_list_cannot_be_empty: { code: 1097, category: DiagnosticCategory.Error, key: "'{0}' list cannot be empty." },
|
||||
Type_parameter_list_cannot_be_empty: { code: 1098, category: DiagnosticCategory.Error, key: "Type parameter list cannot be empty." },
|
||||
Type_argument_list_cannot_be_empty: { code: 1099, category: DiagnosticCategory.Error, key: "Type argument list cannot be empty." },
|
||||
Invalid_use_of_0_in_strict_mode: { code: 1100, category: DiagnosticCategory.Error, key: "Invalid use of '{0}' in strict mode." },
|
||||
with_statements_are_not_allowed_in_strict_mode: { code: 1101, category: DiagnosticCategory.Error, key: "'with' statements are not allowed in strict mode." },
|
||||
delete_cannot_be_called_on_an_identifier_in_strict_mode: { code: 1102, category: DiagnosticCategory.Error, key: "'delete' cannot be called on an identifier in strict mode." },
|
||||
A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: { code: 1104, category: DiagnosticCategory.Error, key: "A 'continue' statement can only be used within an enclosing iteration statement." },
|
||||
A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: { code: 1105, category: DiagnosticCategory.Error, key: "A 'break' statement can only be used within an enclosing iteration or switch statement." },
|
||||
Jump_target_cannot_cross_function_boundary: { code: 1107, category: DiagnosticCategory.Error, key: "Jump target cannot cross function boundary." },
|
||||
A_return_statement_can_only_be_used_within_a_function_body: { code: 1108, category: DiagnosticCategory.Error, key: "A 'return' statement can only be used within a function body." },
|
||||
Expression_expected: { code: 1109, category: DiagnosticCategory.Error, key: "Expression expected." },
|
||||
Type_expected: { code: 1110, category: DiagnosticCategory.Error, key: "Type expected." },
|
||||
A_class_member_cannot_be_declared_optional: { code: 1112, category: DiagnosticCategory.Error, key: "A class member cannot be declared optional." },
|
||||
A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: { code: 1113, category: DiagnosticCategory.Error, key: "A 'default' clause cannot appear more than once in a 'switch' statement." },
|
||||
Duplicate_label_0: { code: 1114, category: DiagnosticCategory.Error, key: "Duplicate label '{0}'" },
|
||||
A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: { code: 1115, category: DiagnosticCategory.Error, key: "A 'continue' statement can only jump to a label of an enclosing iteration statement." },
|
||||
A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: { code: 1116, category: DiagnosticCategory.Error, key: "A 'break' statement can only jump to a label of an enclosing statement." },
|
||||
An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode: { code: 1117, category: DiagnosticCategory.Error, key: "An object literal cannot have multiple properties with the same name in strict mode." },
|
||||
An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: { code: 1118, category: DiagnosticCategory.Error, key: "An object literal cannot have multiple get/set accessors with the same name." },
|
||||
An_object_literal_cannot_have_property_and_accessor_with_the_same_name: { code: 1119, category: DiagnosticCategory.Error, key: "An object literal cannot have property and accessor with the same name." },
|
||||
An_export_assignment_cannot_have_modifiers: { code: 1120, category: DiagnosticCategory.Error, key: "An export assignment cannot have modifiers." },
|
||||
Octal_literals_are_not_allowed_in_strict_mode: { code: 1121, category: DiagnosticCategory.Error, key: "Octal literals are not allowed in strict mode." },
|
||||
A_tuple_type_element_list_cannot_be_empty: { code: 1122, category: DiagnosticCategory.Error, key: "A tuple type element list cannot be empty." },
|
||||
Variable_declaration_list_cannot_be_empty: { code: 1123, category: DiagnosticCategory.Error, key: "Variable declaration list cannot be empty." },
|
||||
Digit_expected: { code: 1124, category: DiagnosticCategory.Error, key: "Digit expected." },
|
||||
Hexadecimal_digit_expected: { code: 1125, category: DiagnosticCategory.Error, key: "Hexadecimal digit expected." },
|
||||
Unexpected_end_of_text: { code: 1126, category: DiagnosticCategory.Error, key: "Unexpected end of text." },
|
||||
Invalid_character: { code: 1127, category: DiagnosticCategory.Error, key: "Invalid character." },
|
||||
Declaration_or_statement_expected: { code: 1128, category: DiagnosticCategory.Error, key: "Declaration or statement expected." },
|
||||
Statement_expected: { code: 1129, category: DiagnosticCategory.Error, key: "Statement expected." },
|
||||
case_or_default_expected: { code: 1130, category: DiagnosticCategory.Error, key: "'case' or 'default' expected." },
|
||||
Property_or_signature_expected: { code: 1131, category: DiagnosticCategory.Error, key: "Property or signature expected." },
|
||||
Enum_member_expected: { code: 1132, category: DiagnosticCategory.Error, key: "Enum member expected." },
|
||||
Variable_declaration_expected: { code: 1134, category: DiagnosticCategory.Error, key: "Variable declaration expected." },
|
||||
Argument_expression_expected: { code: 1135, category: DiagnosticCategory.Error, key: "Argument expression expected." },
|
||||
Property_assignment_expected: { code: 1136, category: DiagnosticCategory.Error, key: "Property assignment expected." },
|
||||
Expression_or_comma_expected: { code: 1137, category: DiagnosticCategory.Error, key: "Expression or comma expected." },
|
||||
Parameter_declaration_expected: { code: 1138, category: DiagnosticCategory.Error, key: "Parameter declaration expected." },
|
||||
Type_parameter_declaration_expected: { code: 1139, category: DiagnosticCategory.Error, key: "Type parameter declaration expected." },
|
||||
Type_argument_expected: { code: 1140, category: DiagnosticCategory.Error, key: "Type argument expected." },
|
||||
String_literal_expected: { code: 1141, category: DiagnosticCategory.Error, key: "String literal expected." },
|
||||
Line_break_not_permitted_here: { code: 1142, category: DiagnosticCategory.Error, key: "Line break not permitted here." },
|
||||
or_expected: { code: 1144, category: DiagnosticCategory.Error, key: "'{' or ';' expected." },
|
||||
Modifiers_not_permitted_on_index_signature_members: { code: 1145, category: DiagnosticCategory.Error, key: "Modifiers not permitted on index signature members." },
|
||||
Declaration_expected: { code: 1146, category: DiagnosticCategory.Error, key: "Declaration expected." },
|
||||
Import_declarations_in_a_namespace_cannot_reference_a_module: { code: 1147, category: DiagnosticCategory.Error, key: "Import declarations in a namespace cannot reference a module." },
|
||||
Cannot_compile_modules_unless_the_module_flag_is_provided: { code: 1148, category: DiagnosticCategory.Error, key: "Cannot compile modules unless the '--module' flag is provided." },
|
||||
File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: DiagnosticCategory.Error, key: "File name '{0}' differs from already included file name '{1}' only in casing" },
|
||||
new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: DiagnosticCategory.Error, key: "'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead." },
|
||||
const_declarations_must_be_initialized: { code: 1155, category: DiagnosticCategory.Error, key: "'const' declarations must be initialized" },
|
||||
const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: DiagnosticCategory.Error, key: "'const' declarations can only be declared inside a block." },
|
||||
let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: DiagnosticCategory.Error, key: "'let' declarations can only be declared inside a block." },
|
||||
Unterminated_template_literal: { code: 1160, category: DiagnosticCategory.Error, key: "Unterminated template literal." },
|
||||
Unterminated_regular_expression_literal: { code: 1161, category: DiagnosticCategory.Error, key: "Unterminated regular expression literal." },
|
||||
An_object_member_cannot_be_declared_optional: { code: 1162, category: DiagnosticCategory.Error, key: "An object member cannot be declared optional." },
|
||||
A_yield_expression_is_only_allowed_in_a_generator_body: { code: 1163, category: DiagnosticCategory.Error, key: "A 'yield' expression is only allowed in a generator body." },
|
||||
Computed_property_names_are_not_allowed_in_enums: { code: 1164, category: DiagnosticCategory.Error, key: "Computed property names are not allowed in enums." },
|
||||
A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_symbol: { code: 1165, category: DiagnosticCategory.Error, key: "A computed property name in an ambient context must directly refer to a built-in symbol." },
|
||||
A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol: { code: 1166, category: DiagnosticCategory.Error, key: "A computed property name in a class property declaration must directly refer to a built-in symbol." },
|
||||
A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol: { code: 1168, category: DiagnosticCategory.Error, key: "A computed property name in a method overload must directly refer to a built-in symbol." },
|
||||
A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol: { code: 1169, category: DiagnosticCategory.Error, key: "A computed property name in an interface must directly refer to a built-in symbol." },
|
||||
A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol: { code: 1170, category: DiagnosticCategory.Error, key: "A computed property name in a type literal must directly refer to a built-in symbol." },
|
||||
A_comma_expression_is_not_allowed_in_a_computed_property_name: { code: 1171, category: DiagnosticCategory.Error, key: "A comma expression is not allowed in a computed property name." },
|
||||
extends_clause_already_seen: { code: 1172, category: DiagnosticCategory.Error, key: "'extends' clause already seen." },
|
||||
extends_clause_must_precede_implements_clause: { code: 1173, category: DiagnosticCategory.Error, key: "'extends' clause must precede 'implements' clause." },
|
||||
Classes_can_only_extend_a_single_class: { code: 1174, category: DiagnosticCategory.Error, key: "Classes can only extend a single class." },
|
||||
implements_clause_already_seen: { code: 1175, category: DiagnosticCategory.Error, key: "'implements' clause already seen." },
|
||||
Interface_declaration_cannot_have_implements_clause: { code: 1176, category: DiagnosticCategory.Error, key: "Interface declaration cannot have 'implements' clause." },
|
||||
Binary_digit_expected: { code: 1177, category: DiagnosticCategory.Error, key: "Binary digit expected." },
|
||||
Octal_digit_expected: { code: 1178, category: DiagnosticCategory.Error, key: "Octal digit expected." },
|
||||
Unexpected_token_expected: { code: 1179, category: DiagnosticCategory.Error, key: "Unexpected token. '{' expected." },
|
||||
Property_destructuring_pattern_expected: { code: 1180, category: DiagnosticCategory.Error, key: "Property destructuring pattern expected." },
|
||||
Array_element_destructuring_pattern_expected: { code: 1181, category: DiagnosticCategory.Error, key: "Array element destructuring pattern expected." },
|
||||
A_destructuring_declaration_must_have_an_initializer: { code: 1182, category: DiagnosticCategory.Error, key: "A destructuring declaration must have an initializer." },
|
||||
An_implementation_cannot_be_declared_in_ambient_contexts: { code: 1184, category: DiagnosticCategory.Error, key: "An implementation cannot be declared in ambient contexts." },
|
||||
Modifiers_cannot_appear_here: { code: 1184, category: DiagnosticCategory.Error, key: "Modifiers cannot appear here." },
|
||||
Merge_conflict_marker_encountered: { code: 1185, category: DiagnosticCategory.Error, key: "Merge conflict marker encountered." },
|
||||
A_rest_element_cannot_have_an_initializer: { code: 1186, category: DiagnosticCategory.Error, key: "A rest element cannot have an initializer." },
|
||||
A_parameter_property_may_not_be_a_binding_pattern: { code: 1187, category: DiagnosticCategory.Error, key: "A parameter property may not be a binding pattern." },
|
||||
Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement: { code: 1188, category: DiagnosticCategory.Error, key: "Only a single variable declaration is allowed in a 'for...of' statement." },
|
||||
The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: { code: 1189, category: DiagnosticCategory.Error, key: "The variable declaration of a 'for...in' statement cannot have an initializer." },
|
||||
The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: { code: 1190, category: DiagnosticCategory.Error, key: "The variable declaration of a 'for...of' statement cannot have an initializer." },
|
||||
An_import_declaration_cannot_have_modifiers: { code: 1191, category: DiagnosticCategory.Error, key: "An import declaration cannot have modifiers." },
|
||||
Module_0_has_no_default_export: { code: 1192, category: DiagnosticCategory.Error, key: "Module '{0}' has no default export." },
|
||||
An_export_declaration_cannot_have_modifiers: { code: 1193, category: DiagnosticCategory.Error, key: "An export declaration cannot have modifiers." },
|
||||
Export_declarations_are_not_permitted_in_a_namespace: { code: 1194, category: DiagnosticCategory.Error, key: "Export declarations are not permitted in a namespace." },
|
||||
Catch_clause_variable_name_must_be_an_identifier: { code: 1195, category: DiagnosticCategory.Error, key: "Catch clause variable name must be an identifier." },
|
||||
Catch_clause_variable_cannot_have_a_type_annotation: { code: 1196, category: DiagnosticCategory.Error, key: "Catch clause variable cannot have a type annotation." },
|
||||
Catch_clause_variable_cannot_have_an_initializer: { code: 1197, category: DiagnosticCategory.Error, key: "Catch clause variable cannot have an initializer." },
|
||||
An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: { code: 1198, category: DiagnosticCategory.Error, key: "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive." },
|
||||
Unterminated_Unicode_escape_sequence: { code: 1199, category: DiagnosticCategory.Error, key: "Unterminated Unicode escape sequence." },
|
||||
Line_terminator_not_permitted_before_arrow: { code: 1200, category: DiagnosticCategory.Error, key: "Line terminator not permitted before arrow." },
|
||||
Import_assignment_cannot_be_used_when_targeting_ECMAScript_6_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: { code: 1202, category: DiagnosticCategory.Error, key: "Import assignment cannot be used when targeting ECMAScript 6 modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead." },
|
||||
Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_modules_Consider_using_export_default_or_another_module_format_instead: { code: 1203, category: DiagnosticCategory.Error, key: "Export assignment cannot be used when targeting ECMAScript 6 modules. Consider using 'export default' or another module format instead." },
|
||||
Cannot_compile_modules_into_es6_when_targeting_ES5_or_lower: { code: 1204, category: DiagnosticCategory.Error, key: "Cannot compile modules into 'es6' when targeting 'ES5' or lower." },
|
||||
Decorators_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1205, category: DiagnosticCategory.Error, key: "Decorators are only available when targeting ECMAScript 5 and higher." },
|
||||
Decorators_are_not_valid_here: { code: 1206, category: DiagnosticCategory.Error, key: "Decorators are not valid here." },
|
||||
Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: { code: 1207, category: DiagnosticCategory.Error, key: "Decorators cannot be applied to multiple get/set accessors of the same name." },
|
||||
Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided: { code: 1208, category: DiagnosticCategory.Error, key: "Cannot compile namespaces when the '--isolatedModules' flag is provided." },
|
||||
Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided: { code: 1209, category: DiagnosticCategory.Error, key: "Ambient const enums are not allowed when the '--isolatedModules' flag is provided." },
|
||||
Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: { code: 1210, category: DiagnosticCategory.Error, key: "Invalid use of '{0}'. Class definitions are automatically in strict mode." },
|
||||
A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: DiagnosticCategory.Error, key: "A class declaration without the 'default' modifier must have a name" },
|
||||
Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode" },
|
||||
Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1213, category: DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." },
|
||||
Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: { code: 1214, category: DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode." },
|
||||
Invalid_use_of_0_Modules_are_automatically_in_strict_mode: { code: 1215, category: DiagnosticCategory.Error, key: "Invalid use of '{0}'. Modules are automatically in strict mode." },
|
||||
Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: DiagnosticCategory.Error, key: "Export assignment is not supported when '--module' flag is 'system'." },
|
||||
Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalDecorators_to_remove_this_warning: { code: 1219, category: DiagnosticCategory.Error, key: "Experimental support for decorators is a feature that is subject to change in a future release. Specify '--experimentalDecorators' to remove this warning." },
|
||||
Generators_are_only_available_when_targeting_ECMAScript_6_or_higher: { code: 1220, category: DiagnosticCategory.Error, key: "Generators are only available when targeting ECMAScript 6 or higher." },
|
||||
Generators_are_not_allowed_in_an_ambient_context: { code: 1221, category: DiagnosticCategory.Error, key: "Generators are not allowed in an ambient context." },
|
||||
An_overload_signature_cannot_be_declared_as_a_generator: { code: 1222, category: DiagnosticCategory.Error, key: "An overload signature cannot be declared as a generator." },
|
||||
_0_tag_already_specified: { code: 1223, category: DiagnosticCategory.Error, key: "'{0}' tag already specified." },
|
||||
Signature_0_must_have_a_type_predicate: { code: 1224, category: DiagnosticCategory.Error, key: "Signature '{0}' must have a type predicate." },
|
||||
Cannot_find_parameter_0: { code: 1225, category: DiagnosticCategory.Error, key: "Cannot find parameter '{0}'." },
|
||||
Type_predicate_0_is_not_assignable_to_1: { code: 1226, category: DiagnosticCategory.Error, key: "Type predicate '{0}' is not assignable to '{1}'." },
|
||||
Parameter_0_is_not_in_the_same_position_as_parameter_1: { code: 1227, category: DiagnosticCategory.Error, key: "Parameter '{0}' is not in the same position as parameter '{1}'." },
|
||||
A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: { code: 1228, category: DiagnosticCategory.Error, key: "A type predicate is only allowed in return type position for functions and methods." },
|
||||
A_type_predicate_cannot_reference_a_rest_parameter: { code: 1229, category: DiagnosticCategory.Error, key: "A type predicate cannot reference a rest parameter." },
|
||||
A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: { code: 1230, category: DiagnosticCategory.Error, key: "A type predicate cannot reference element '{0}' in a binding pattern." },
|
||||
An_export_assignment_can_only_be_used_in_a_module: { code: 1231, category: DiagnosticCategory.Error, key: "An export assignment can only be used in a module." },
|
||||
An_import_declaration_can_only_be_used_in_a_namespace_or_module: { code: 1232, category: DiagnosticCategory.Error, key: "An import declaration can only be used in a namespace or module." },
|
||||
An_export_declaration_can_only_be_used_in_a_module: { code: 1233, category: DiagnosticCategory.Error, key: "An export declaration can only be used in a module." },
|
||||
An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: { code: 1234, category: DiagnosticCategory.Error, key: "An ambient module declaration is only allowed at the top level in a file." },
|
||||
A_namespace_declaration_is_only_allowed_in_a_namespace_or_module: { code: 1235, category: DiagnosticCategory.Error, key: "A namespace declaration is only allowed in a namespace or module." },
|
||||
Experimental_support_for_async_functions_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalAsyncFunctions_to_remove_this_warning: { code: 1236, category: DiagnosticCategory.Error, key: "Experimental support for async functions is a feature that is subject to change in a future release. Specify '--experimentalAsyncFunctions' to remove this warning." },
|
||||
with_statements_are_not_allowed_in_an_async_function_block: { code: 1300, category: DiagnosticCategory.Error, key: "'with' statements are not allowed in an async function block." },
|
||||
await_expression_is_only_allowed_within_an_async_function: { code: 1308, category: DiagnosticCategory.Error, key: "'await' expression is only allowed within an async function." },
|
||||
Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1311, category: DiagnosticCategory.Error, key: "Async functions are only available when targeting ECMAScript 6 and higher." },
|
||||
The_return_type_of_a_property_decorator_function_must_be_either_void_or_any: { code: 1236, category: DiagnosticCategory.Error, key: "The return type of a property decorator function must be either 'void' or 'any'." },
|
||||
The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any: { code: 1237, category: DiagnosticCategory.Error, key: "The return type of a parameter decorator function must be either 'void' or 'any'." },
|
||||
Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression: { code: 1238, category: DiagnosticCategory.Error, key: "Unable to resolve signature of class decorator when called as an expression." },
|
||||
Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression: { code: 1239, category: DiagnosticCategory.Error, key: "Unable to resolve signature of parameter decorator when called as an expression." },
|
||||
Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression: { code: 1240, category: DiagnosticCategory.Error, key: "Unable to resolve signature of property decorator when called as an expression." },
|
||||
Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression: { code: 1241, category: DiagnosticCategory.Error, key: "Unable to resolve signature of method decorator when called as an expression." },
|
||||
abstract_modifier_can_only_appear_on_a_class_or_method_declaration: { code: 1242, category: DiagnosticCategory.Error, key: "'abstract' modifier can only appear on a class or method declaration." },
|
||||
_0_modifier_cannot_be_used_with_1_modifier: { code: 1243, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used with '{1}' modifier." },
|
||||
Abstract_methods_can_only_appear_within_an_abstract_class: { code: 1244, category: DiagnosticCategory.Error, key: "Abstract methods can only appear within an abstract class." },
|
||||
Method_0_cannot_have_an_implementation_because_it_is_marked_abstract: { code: 1245, category: DiagnosticCategory.Error, key: "Method '{0}' cannot have an implementation because it is marked abstract." },
|
||||
Duplicate_identifier_0: { code: 2300, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." },
|
||||
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." },
|
||||
Static_members_cannot_reference_class_type_parameters: { code: 2302, category: DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." },
|
||||
Circular_definition_of_import_alias_0: { code: 2303, category: DiagnosticCategory.Error, key: "Circular definition of import alias '{0}'." },
|
||||
Cannot_find_name_0: { code: 2304, category: DiagnosticCategory.Error, key: "Cannot find name '{0}'." },
|
||||
Module_0_has_no_exported_member_1: { code: 2305, category: DiagnosticCategory.Error, key: "Module '{0}' has no exported member '{1}'." },
|
||||
File_0_is_not_a_module: { code: 2306, category: DiagnosticCategory.Error, key: "File '{0}' is not a module." },
|
||||
Cannot_find_module_0: { code: 2307, category: DiagnosticCategory.Error, key: "Cannot find module '{0}'." },
|
||||
An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: { code: 2309, category: DiagnosticCategory.Error, key: "An export assignment cannot be used in a module with other exported elements." },
|
||||
Type_0_recursively_references_itself_as_a_base_type: { code: 2310, category: DiagnosticCategory.Error, key: "Type '{0}' recursively references itself as a base type." },
|
||||
A_class_may_only_extend_another_class: { code: 2311, category: DiagnosticCategory.Error, key: "A class may only extend another class." },
|
||||
An_interface_may_only_extend_a_class_or_another_interface: { code: 2312, category: DiagnosticCategory.Error, key: "An interface may only extend a class or another interface." },
|
||||
Constraint_of_a_type_parameter_cannot_reference_any_type_parameter_from_the_same_type_parameter_list: { code: 2313, category: DiagnosticCategory.Error, key: "Constraint of a type parameter cannot reference any type parameter from the same type parameter list." },
|
||||
Generic_type_0_requires_1_type_argument_s: { code: 2314, category: DiagnosticCategory.Error, key: "Generic type '{0}' requires {1} type argument(s)." },
|
||||
Type_0_is_not_generic: { code: 2315, category: DiagnosticCategory.Error, key: "Type '{0}' is not generic." },
|
||||
Global_type_0_must_be_a_class_or_interface_type: { code: 2316, category: DiagnosticCategory.Error, key: "Global type '{0}' must be a class or interface type." },
|
||||
Global_type_0_must_have_1_type_parameter_s: { code: 2317, category: DiagnosticCategory.Error, key: "Global type '{0}' must have {1} type parameter(s)." },
|
||||
Cannot_find_global_type_0: { code: 2318, category: DiagnosticCategory.Error, key: "Cannot find global type '{0}'." },
|
||||
Named_property_0_of_types_1_and_2_are_not_identical: { code: 2319, category: DiagnosticCategory.Error, key: "Named property '{0}' of types '{1}' and '{2}' are not identical." },
|
||||
Interface_0_cannot_simultaneously_extend_types_1_and_2: { code: 2320, category: DiagnosticCategory.Error, key: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'." },
|
||||
Excessive_stack_depth_comparing_types_0_and_1: { code: 2321, category: DiagnosticCategory.Error, key: "Excessive stack depth comparing types '{0}' and '{1}'." },
|
||||
Type_0_is_not_assignable_to_type_1: { code: 2322, category: DiagnosticCategory.Error, key: "Type '{0}' is not assignable to type '{1}'." },
|
||||
Property_0_is_missing_in_type_1: { code: 2324, category: DiagnosticCategory.Error, key: "Property '{0}' is missing in type '{1}'." },
|
||||
Property_0_is_private_in_type_1_but_not_in_type_2: { code: 2325, category: DiagnosticCategory.Error, key: "Property '{0}' is private in type '{1}' but not in type '{2}'." },
|
||||
Types_of_property_0_are_incompatible: { code: 2326, category: DiagnosticCategory.Error, key: "Types of property '{0}' are incompatible." },
|
||||
Property_0_is_optional_in_type_1_but_required_in_type_2: { code: 2327, category: DiagnosticCategory.Error, key: "Property '{0}' is optional in type '{1}' but required in type '{2}'." },
|
||||
Types_of_parameters_0_and_1_are_incompatible: { code: 2328, category: DiagnosticCategory.Error, key: "Types of parameters '{0}' and '{1}' are incompatible." },
|
||||
Index_signature_is_missing_in_type_0: { code: 2329, category: DiagnosticCategory.Error, key: "Index signature is missing in type '{0}'." },
|
||||
Index_signatures_are_incompatible: { code: 2330, category: DiagnosticCategory.Error, key: "Index signatures are incompatible." },
|
||||
this_cannot_be_referenced_in_a_module_or_namespace_body: { code: 2331, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in a module or namespace body." },
|
||||
this_cannot_be_referenced_in_current_location: { code: 2332, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in current location." },
|
||||
this_cannot_be_referenced_in_constructor_arguments: { code: 2333, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in constructor arguments." },
|
||||
this_cannot_be_referenced_in_a_static_property_initializer: { code: 2334, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in a static property initializer." },
|
||||
super_can_only_be_referenced_in_a_derived_class: { code: 2335, category: DiagnosticCategory.Error, key: "'super' can only be referenced in a derived class." },
|
||||
super_cannot_be_referenced_in_constructor_arguments: { code: 2336, category: DiagnosticCategory.Error, key: "'super' cannot be referenced in constructor arguments." },
|
||||
Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: { code: 2337, category: DiagnosticCategory.Error, key: "Super calls are not permitted outside constructors or in nested functions inside constructors." },
|
||||
super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: { code: 2338, category: DiagnosticCategory.Error, key: "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class." },
|
||||
Property_0_does_not_exist_on_type_1: { code: 2339, category: DiagnosticCategory.Error, key: "Property '{0}' does not exist on type '{1}'." },
|
||||
Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: DiagnosticCategory.Error, key: "Only public and protected methods of the base class are accessible via the 'super' keyword." },
|
||||
Property_0_is_private_and_only_accessible_within_class_1: { code: 2341, category: DiagnosticCategory.Error, key: "Property '{0}' is private and only accessible within class '{1}'." },
|
||||
An_index_expression_argument_must_be_of_type_string_number_symbol_or_any: { code: 2342, category: DiagnosticCategory.Error, key: "An index expression argument must be of type 'string', 'number', 'symbol', or 'any'." },
|
||||
Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: DiagnosticCategory.Error, key: "Type '{0}' does not satisfy the constraint '{1}'." },
|
||||
Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 2345, category: DiagnosticCategory.Error, key: "Argument of type '{0}' is not assignable to parameter of type '{1}'." },
|
||||
Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 2346, category: DiagnosticCategory.Error, key: "Supplied parameters do not match any signature of call target." },
|
||||
Untyped_function_calls_may_not_accept_type_arguments: { code: 2347, category: DiagnosticCategory.Error, key: "Untyped function calls may not accept type arguments." },
|
||||
Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: { code: 2348, category: DiagnosticCategory.Error, key: "Value of type '{0}' is not callable. Did you mean to include 'new'?" },
|
||||
Cannot_invoke_an_expression_whose_type_lacks_a_call_signature: { code: 2349, category: DiagnosticCategory.Error, key: "Cannot invoke an expression whose type lacks a call signature." },
|
||||
Only_a_void_function_can_be_called_with_the_new_keyword: { code: 2350, category: DiagnosticCategory.Error, key: "Only a void function can be called with the 'new' keyword." },
|
||||
Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: DiagnosticCategory.Error, key: "Cannot use 'new' with an expression whose type lacks a call or construct signature." },
|
||||
Neither_type_0_nor_type_1_is_assignable_to_the_other: { code: 2352, category: DiagnosticCategory.Error, key: "Neither type '{0}' nor type '{1}' is assignable to the other." },
|
||||
Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: { code: 2353, category: DiagnosticCategory.Error, key: "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'." },
|
||||
No_best_common_type_exists_among_return_expressions: { code: 2354, category: DiagnosticCategory.Error, key: "No best common type exists among return expressions." },
|
||||
A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2355, category: DiagnosticCategory.Error, key: "A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement." },
|
||||
An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: { code: 2356, category: DiagnosticCategory.Error, key: "An arithmetic operand must be of type 'any', 'number' or an enum type." },
|
||||
The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer: { code: 2357, category: DiagnosticCategory.Error, key: "The operand of an increment or decrement operator must be a variable, property or indexer." },
|
||||
The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2358, category: DiagnosticCategory.Error, key: "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter." },
|
||||
The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: { code: 2359, category: DiagnosticCategory.Error, key: "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type." },
|
||||
The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol: { code: 2360, category: DiagnosticCategory.Error, key: "The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'." },
|
||||
The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: DiagnosticCategory.Error, key: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter" },
|
||||
The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2362, category: DiagnosticCategory.Error, key: "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
|
||||
The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2363, category: DiagnosticCategory.Error, key: "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
|
||||
Invalid_left_hand_side_of_assignment_expression: { code: 2364, category: DiagnosticCategory.Error, key: "Invalid left-hand side of assignment expression." },
|
||||
Operator_0_cannot_be_applied_to_types_1_and_2: { code: 2365, category: DiagnosticCategory.Error, key: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." },
|
||||
Type_parameter_name_cannot_be_0: { code: 2368, category: DiagnosticCategory.Error, key: "Type parameter name cannot be '{0}'" },
|
||||
A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2369, category: DiagnosticCategory.Error, key: "A parameter property is only allowed in a constructor implementation." },
|
||||
A_rest_parameter_must_be_of_an_array_type: { code: 2370, category: DiagnosticCategory.Error, key: "A rest parameter must be of an array type." },
|
||||
A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: { code: 2371, category: DiagnosticCategory.Error, key: "A parameter initializer is only allowed in a function or constructor implementation." },
|
||||
Parameter_0_cannot_be_referenced_in_its_initializer: { code: 2372, category: DiagnosticCategory.Error, key: "Parameter '{0}' cannot be referenced in its initializer." },
|
||||
Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it: { code: 2373, category: DiagnosticCategory.Error, key: "Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it." },
|
||||
Duplicate_string_index_signature: { code: 2374, category: DiagnosticCategory.Error, key: "Duplicate string index signature." },
|
||||
Duplicate_number_index_signature: { code: 2375, category: DiagnosticCategory.Error, key: "Duplicate number index signature." },
|
||||
A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties: { code: 2376, category: DiagnosticCategory.Error, key: "A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties." },
|
||||
Constructors_for_derived_classes_must_contain_a_super_call: { code: 2377, category: DiagnosticCategory.Error, key: "Constructors for derived classes must contain a 'super' call." },
|
||||
A_get_accessor_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2378, category: DiagnosticCategory.Error, key: "A 'get' accessor must return a value or consist of a single 'throw' statement." },
|
||||
Getter_and_setter_accessors_do_not_agree_in_visibility: { code: 2379, category: DiagnosticCategory.Error, key: "Getter and setter accessors do not agree in visibility." },
|
||||
get_and_set_accessor_must_have_the_same_type: { code: 2380, category: DiagnosticCategory.Error, key: "'get' and 'set' accessor must have the same type." },
|
||||
A_signature_with_an_implementation_cannot_use_a_string_literal_type: { code: 2381, category: DiagnosticCategory.Error, key: "A signature with an implementation cannot use a string literal type." },
|
||||
Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: { code: 2382, category: DiagnosticCategory.Error, key: "Specialized overload signature is not assignable to any non-specialized signature." },
|
||||
Overload_signatures_must_all_be_exported_or_not_exported: { code: 2383, category: DiagnosticCategory.Error, key: "Overload signatures must all be exported or not exported." },
|
||||
Overload_signatures_must_all_be_ambient_or_non_ambient: { code: 2384, category: DiagnosticCategory.Error, key: "Overload signatures must all be ambient or non-ambient." },
|
||||
Overload_signatures_must_all_be_public_private_or_protected: { code: 2385, category: DiagnosticCategory.Error, key: "Overload signatures must all be public, private or protected." },
|
||||
Overload_signatures_must_all_be_optional_or_required: { code: 2386, category: DiagnosticCategory.Error, key: "Overload signatures must all be optional or required." },
|
||||
Function_overload_must_be_static: { code: 2387, category: DiagnosticCategory.Error, key: "Function overload must be static." },
|
||||
Function_overload_must_not_be_static: { code: 2388, category: DiagnosticCategory.Error, key: "Function overload must not be static." },
|
||||
Function_implementation_name_must_be_0: { code: 2389, category: DiagnosticCategory.Error, key: "Function implementation name must be '{0}'." },
|
||||
Constructor_implementation_is_missing: { code: 2390, category: DiagnosticCategory.Error, key: "Constructor implementation is missing." },
|
||||
Function_implementation_is_missing_or_not_immediately_following_the_declaration: { code: 2391, category: DiagnosticCategory.Error, key: "Function implementation is missing or not immediately following the declaration." },
|
||||
Multiple_constructor_implementations_are_not_allowed: { code: 2392, category: DiagnosticCategory.Error, key: "Multiple constructor implementations are not allowed." },
|
||||
Duplicate_function_implementation: { code: 2393, category: DiagnosticCategory.Error, key: "Duplicate function implementation." },
|
||||
Overload_signature_is_not_compatible_with_function_implementation: { code: 2394, category: DiagnosticCategory.Error, key: "Overload signature is not compatible with function implementation." },
|
||||
Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: { code: 2395, category: DiagnosticCategory.Error, key: "Individual declarations in merged declaration '{0}' must be all exported or all local." },
|
||||
Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: { code: 2396, category: DiagnosticCategory.Error, key: "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters." },
|
||||
Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: { code: 2399, category: DiagnosticCategory.Error, key: "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference." },
|
||||
Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: { code: 2400, category: DiagnosticCategory.Error, key: "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference." },
|
||||
Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference: { code: 2401, category: DiagnosticCategory.Error, key: "Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference." },
|
||||
Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: { code: 2402, category: DiagnosticCategory.Error, key: "Expression resolves to '_super' that compiler uses to capture base class reference." },
|
||||
Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: { code: 2403, category: DiagnosticCategory.Error, key: "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'." },
|
||||
The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: { code: 2404, category: DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement cannot use a type annotation." },
|
||||
The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: { code: 2405, category: DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'." },
|
||||
Invalid_left_hand_side_in_for_in_statement: { code: 2406, category: DiagnosticCategory.Error, key: "Invalid left-hand side in 'for...in' statement." },
|
||||
The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2407, category: DiagnosticCategory.Error, key: "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter." },
|
||||
Setters_cannot_return_a_value: { code: 2408, category: DiagnosticCategory.Error, key: "Setters cannot return a value." },
|
||||
Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: DiagnosticCategory.Error, key: "Return type of constructor signature must be assignable to the instance type of the class" },
|
||||
All_symbols_within_a_with_block_will_be_resolved_to_any: { code: 2410, category: DiagnosticCategory.Error, key: "All symbols within a 'with' block will be resolved to 'any'." },
|
||||
Property_0_of_type_1_is_not_assignable_to_string_index_type_2: { code: 2411, category: DiagnosticCategory.Error, key: "Property '{0}' of type '{1}' is not assignable to string index type '{2}'." },
|
||||
Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: { code: 2412, category: DiagnosticCategory.Error, key: "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'." },
|
||||
Numeric_index_type_0_is_not_assignable_to_string_index_type_1: { code: 2413, category: DiagnosticCategory.Error, key: "Numeric index type '{0}' is not assignable to string index type '{1}'." },
|
||||
Class_name_cannot_be_0: { code: 2414, category: DiagnosticCategory.Error, key: "Class name cannot be '{0}'" },
|
||||
Class_0_incorrectly_extends_base_class_1: { code: 2415, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly extends base class '{1}'." },
|
||||
Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: DiagnosticCategory.Error, key: "Class static side '{0}' incorrectly extends base class static side '{1}'." },
|
||||
Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0: { code: 2419, category: DiagnosticCategory.Error, key: "Type name '{0}' in extends clause does not reference constructor function for '{0}'." },
|
||||
Class_0_incorrectly_implements_interface_1: { code: 2420, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly implements interface '{1}'." },
|
||||
A_class_may_only_implement_another_class_or_interface: { code: 2422, category: DiagnosticCategory.Error, key: "A class may only implement another class or interface." },
|
||||
Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: { code: 2423, category: DiagnosticCategory.Error, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor." },
|
||||
Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: { code: 2424, category: DiagnosticCategory.Error, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." },
|
||||
Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2425, category: DiagnosticCategory.Error, key: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function." },
|
||||
Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: DiagnosticCategory.Error, key: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." },
|
||||
Interface_name_cannot_be_0: { code: 2427, category: DiagnosticCategory.Error, key: "Interface name cannot be '{0}'" },
|
||||
All_declarations_of_an_interface_must_have_identical_type_parameters: { code: 2428, category: DiagnosticCategory.Error, key: "All declarations of an interface must have identical type parameters." },
|
||||
Interface_0_incorrectly_extends_interface_1: { code: 2430, category: DiagnosticCategory.Error, key: "Interface '{0}' incorrectly extends interface '{1}'." },
|
||||
Enum_name_cannot_be_0: { code: 2431, category: DiagnosticCategory.Error, key: "Enum name cannot be '{0}'" },
|
||||
In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: DiagnosticCategory.Error, key: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." },
|
||||
A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: DiagnosticCategory.Error, key: "A namespace declaration cannot be in a different file from a class or function with which it is merged" },
|
||||
A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: DiagnosticCategory.Error, key: "A namespace declaration cannot be located prior to a class or function with which it is merged" },
|
||||
Ambient_modules_cannot_be_nested_in_other_modules: { code: 2435, category: DiagnosticCategory.Error, key: "Ambient modules cannot be nested in other modules." },
|
||||
Ambient_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: DiagnosticCategory.Error, key: "Ambient module declaration cannot specify relative module name." },
|
||||
Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: DiagnosticCategory.Error, key: "Module '{0}' is hidden by a local declaration with the same name" },
|
||||
Import_name_cannot_be_0: { code: 2438, category: DiagnosticCategory.Error, key: "Import name cannot be '{0}'" },
|
||||
Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: { code: 2439, category: DiagnosticCategory.Error, key: "Import or export declaration in an ambient module declaration cannot reference module through relative module name." },
|
||||
Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: DiagnosticCategory.Error, key: "Import declaration conflicts with local declaration of '{0}'" },
|
||||
Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: { code: 2441, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module." },
|
||||
Types_have_separate_declarations_of_a_private_property_0: { code: 2442, category: DiagnosticCategory.Error, key: "Types have separate declarations of a private property '{0}'." },
|
||||
Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: { code: 2443, category: DiagnosticCategory.Error, key: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'." },
|
||||
Property_0_is_protected_in_type_1_but_public_in_type_2: { code: 2444, category: DiagnosticCategory.Error, key: "Property '{0}' is protected in type '{1}' but public in type '{2}'." },
|
||||
Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: { code: 2445, category: DiagnosticCategory.Error, key: "Property '{0}' is protected and only accessible within class '{1}' and its subclasses." },
|
||||
Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: { code: 2446, category: DiagnosticCategory.Error, key: "Property '{0}' is protected and only accessible through an instance of class '{1}'." },
|
||||
The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: { code: 2447, category: DiagnosticCategory.Error, key: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead." },
|
||||
Block_scoped_variable_0_used_before_its_declaration: { code: 2448, category: DiagnosticCategory.Error, key: "Block-scoped variable '{0}' used before its declaration." },
|
||||
The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant: { code: 2449, category: DiagnosticCategory.Error, key: "The operand of an increment or decrement operator cannot be a constant." },
|
||||
Left_hand_side_of_assignment_expression_cannot_be_a_constant: { code: 2450, category: DiagnosticCategory.Error, key: "Left-hand side of assignment expression cannot be a constant." },
|
||||
Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: DiagnosticCategory.Error, key: "Cannot redeclare block-scoped variable '{0}'." },
|
||||
An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: DiagnosticCategory.Error, key: "An enum member cannot have a numeric name." },
|
||||
The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: DiagnosticCategory.Error, key: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." },
|
||||
Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: DiagnosticCategory.Error, key: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." },
|
||||
Type_alias_0_circularly_references_itself: { code: 2456, category: DiagnosticCategory.Error, key: "Type alias '{0}' circularly references itself." },
|
||||
Type_alias_name_cannot_be_0: { code: 2457, category: DiagnosticCategory.Error, key: "Type alias name cannot be '{0}'" },
|
||||
An_AMD_module_cannot_have_multiple_name_assignments: { code: 2458, category: DiagnosticCategory.Error, key: "An AMD module cannot have multiple name assignments." },
|
||||
Type_0_has_no_property_1_and_no_string_index_signature: { code: 2459, category: DiagnosticCategory.Error, key: "Type '{0}' has no property '{1}' and no string index signature." },
|
||||
Type_0_has_no_property_1: { code: 2460, category: DiagnosticCategory.Error, key: "Type '{0}' has no property '{1}'." },
|
||||
Type_0_is_not_an_array_type: { code: 2461, category: DiagnosticCategory.Error, key: "Type '{0}' is not an array type." },
|
||||
A_rest_element_must_be_last_in_an_array_destructuring_pattern: { code: 2462, category: DiagnosticCategory.Error, key: "A rest element must be last in an array destructuring pattern" },
|
||||
A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: { code: 2463, category: DiagnosticCategory.Error, key: "A binding pattern parameter cannot be optional in an implementation signature." },
|
||||
A_computed_property_name_must_be_of_type_string_number_symbol_or_any: { code: 2464, category: DiagnosticCategory.Error, key: "A computed property name must be of type 'string', 'number', 'symbol', or 'any'." },
|
||||
this_cannot_be_referenced_in_a_computed_property_name: { code: 2465, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in a computed property name." },
|
||||
super_cannot_be_referenced_in_a_computed_property_name: { code: 2466, category: DiagnosticCategory.Error, key: "'super' cannot be referenced in a computed property name." },
|
||||
A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: { code: 2467, category: DiagnosticCategory.Error, key: "A computed property name cannot reference a type parameter from its containing type." },
|
||||
Cannot_find_global_value_0: { code: 2468, category: DiagnosticCategory.Error, key: "Cannot find global value '{0}'." },
|
||||
The_0_operator_cannot_be_applied_to_type_symbol: { code: 2469, category: DiagnosticCategory.Error, key: "The '{0}' operator cannot be applied to type 'symbol'." },
|
||||
Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object: { code: 2470, category: DiagnosticCategory.Error, key: "'Symbol' reference does not refer to the global Symbol constructor object." },
|
||||
A_computed_property_name_of_the_form_0_must_be_of_type_symbol: { code: 2471, category: DiagnosticCategory.Error, key: "A computed property name of the form '{0}' must be of type 'symbol'." },
|
||||
Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher: { code: 2472, category: DiagnosticCategory.Error, key: "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher." },
|
||||
Enum_declarations_must_all_be_const_or_non_const: { code: 2473, category: DiagnosticCategory.Error, key: "Enum declarations must all be const or non-const." },
|
||||
In_const_enum_declarations_member_initializer_must_be_constant_expression: { code: 2474, category: DiagnosticCategory.Error, key: "In 'const' enum declarations member initializer must be constant expression." },
|
||||
const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment: { code: 2475, category: DiagnosticCategory.Error, key: "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment." },
|
||||
A_const_enum_member_can_only_be_accessed_using_a_string_literal: { code: 2476, category: DiagnosticCategory.Error, key: "A const enum member can only be accessed using a string literal." },
|
||||
const_enum_member_initializer_was_evaluated_to_a_non_finite_value: { code: 2477, category: DiagnosticCategory.Error, key: "'const' enum member initializer was evaluated to a non-finite value." },
|
||||
const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: { code: 2478, category: DiagnosticCategory.Error, key: "'const' enum member initializer was evaluated to disallowed value 'NaN'." },
|
||||
Property_0_does_not_exist_on_const_enum_1: { code: 2479, category: DiagnosticCategory.Error, key: "Property '{0}' does not exist on 'const' enum '{1}'." },
|
||||
let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2480, category: DiagnosticCategory.Error, key: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." },
|
||||
Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: DiagnosticCategory.Error, key: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." },
|
||||
The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: DiagnosticCategory.Error, key: "The left-hand side of a 'for...of' statement cannot use a type annotation." },
|
||||
Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: DiagnosticCategory.Error, key: "Export declaration conflicts with exported declaration of '{0}'" },
|
||||
The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant: { code: 2485, category: DiagnosticCategory.Error, key: "The left-hand side of a 'for...of' statement cannot be a previously defined constant." },
|
||||
The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant: { code: 2486, category: DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement cannot be a previously defined constant." },
|
||||
Invalid_left_hand_side_in_for_of_statement: { code: 2487, category: DiagnosticCategory.Error, key: "Invalid left-hand side in 'for...of' statement." },
|
||||
Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2488, category: DiagnosticCategory.Error, key: "Type must have a '[Symbol.iterator]()' method that returns an iterator." },
|
||||
An_iterator_must_have_a_next_method: { code: 2489, category: DiagnosticCategory.Error, key: "An iterator must have a 'next()' method." },
|
||||
The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: { code: 2490, category: DiagnosticCategory.Error, key: "The type returned by the 'next()' method of an iterator must have a 'value' property." },
|
||||
The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: { code: 2491, category: DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement cannot be a destructuring pattern." },
|
||||
Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: DiagnosticCategory.Error, key: "Cannot redeclare identifier '{0}' in catch clause" },
|
||||
Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: { code: 2493, category: DiagnosticCategory.Error, key: "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'." },
|
||||
Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: DiagnosticCategory.Error, key: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." },
|
||||
Type_0_is_not_an_array_type_or_a_string_type: { code: 2495, category: DiagnosticCategory.Error, key: "Type '{0}' is not an array type or a string type." },
|
||||
The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression: { code: 2496, category: DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression." },
|
||||
Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct: { code: 2497, category: DiagnosticCategory.Error, key: "Module '{0}' resolves to a non-module entity and cannot be imported using this construct." },
|
||||
Module_0_uses_export_and_cannot_be_used_with_export_Asterisk: { code: 2498, category: DiagnosticCategory.Error, key: "Module '{0}' uses 'export =' and cannot be used with 'export *'." },
|
||||
An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2499, category: DiagnosticCategory.Error, key: "An interface can only extend an identifier/qualified-name with optional type arguments." },
|
||||
A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2500, category: DiagnosticCategory.Error, key: "A class can only implement an identifier/qualified-name with optional type arguments." },
|
||||
A_rest_element_cannot_contain_a_binding_pattern: { code: 2501, category: DiagnosticCategory.Error, key: "A rest element cannot contain a binding pattern." },
|
||||
_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 2502, category: DiagnosticCategory.Error, key: "'{0}' is referenced directly or indirectly in its own type annotation." },
|
||||
Cannot_find_namespace_0: { code: 2503, category: DiagnosticCategory.Error, key: "Cannot find namespace '{0}'." },
|
||||
No_best_common_type_exists_among_yield_expressions: { code: 2504, category: DiagnosticCategory.Error, key: "No best common type exists among yield expressions." },
|
||||
A_generator_cannot_have_a_void_type_annotation: { code: 2505, category: DiagnosticCategory.Error, key: "A generator cannot have a 'void' type annotation." },
|
||||
_0_is_referenced_directly_or_indirectly_in_its_own_base_expression: { code: 2506, category: DiagnosticCategory.Error, key: "'{0}' is referenced directly or indirectly in its own base expression." },
|
||||
Type_0_is_not_a_constructor_function_type: { code: 2507, category: DiagnosticCategory.Error, key: "Type '{0}' is not a constructor function type." },
|
||||
No_base_constructor_has_the_specified_number_of_type_arguments: { code: 2508, category: DiagnosticCategory.Error, key: "No base constructor has the specified number of type arguments." },
|
||||
Base_constructor_return_type_0_is_not_a_class_or_interface_type: { code: 2509, category: DiagnosticCategory.Error, key: "Base constructor return type '{0}' is not a class or interface type." },
|
||||
Base_constructors_must_all_have_the_same_return_type: { code: 2510, category: DiagnosticCategory.Error, key: "Base constructors must all have the same return type." },
|
||||
Cannot_create_an_instance_of_the_abstract_class_0: { code: 2511, category: DiagnosticCategory.Error, key: "Cannot create an instance of the abstract class '{0}'." },
|
||||
Overload_signatures_must_all_be_abstract_or_not_abstract: { code: 2512, category: DiagnosticCategory.Error, key: "Overload signatures must all be abstract or not abstract." },
|
||||
Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: { code: 2513, category: DiagnosticCategory.Error, key: "Abstract method '{0}' in class '{1}' cannot be accessed via super expression." },
|
||||
Classes_containing_abstract_methods_must_be_marked_abstract: { code: 2514, category: DiagnosticCategory.Error, key: "Classes containing abstract methods must be marked abstract." },
|
||||
Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: { code: 2515, category: DiagnosticCategory.Error, key: "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'." },
|
||||
All_declarations_of_an_abstract_method_must_be_consecutive: { code: 2516, category: DiagnosticCategory.Error, key: "All declarations of an abstract method must be consecutive." },
|
||||
Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: { code: 2517, category: DiagnosticCategory.Error, key: "Cannot assign an abstract constructor type to a non-abstract constructor type." },
|
||||
Only_an_ambient_class_can_be_merged_with_an_interface: { code: 2518, category: DiagnosticCategory.Error, key: "Only an ambient class can be merged with an interface." },
|
||||
Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." },
|
||||
Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: DiagnosticCategory.Error, key: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." },
|
||||
The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression: { code: 2522, category: DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression." },
|
||||
yield_expressions_cannot_be_used_in_a_parameter_initializer: { code: 2523, category: DiagnosticCategory.Error, key: "'yield' expressions cannot be used in a parameter initializer." },
|
||||
await_expressions_cannot_be_used_in_a_parameter_initializer: { code: 2524, category: DiagnosticCategory.Error, key: "'await' expressions cannot be used in a parameter initializer." },
|
||||
Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value: { code: 2525, category: DiagnosticCategory.Error, key: "Initializer provides no value for this binding element and the binding element has no default value." },
|
||||
JSX_element_attributes_type_0_must_be_an_object_type: { code: 2600, category: DiagnosticCategory.Error, key: "JSX element attributes type '{0}' must be an object type." },
|
||||
The_return_type_of_a_JSX_element_constructor_must_return_an_object_type: { code: 2601, category: DiagnosticCategory.Error, key: "The return type of a JSX element constructor must return an object type." },
|
||||
JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: { code: 2602, category: DiagnosticCategory.Error, key: "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist." },
|
||||
Property_0_in_type_1_is_not_assignable_to_type_2: { code: 2603, category: DiagnosticCategory.Error, key: "Property '{0}' in type '{1}' is not assignable to type '{2}'" },
|
||||
JSX_element_type_0_does_not_have_any_construct_or_call_signatures: { code: 2604, category: DiagnosticCategory.Error, key: "JSX element type '{0}' does not have any construct or call signatures." },
|
||||
JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements: { code: 2605, category: DiagnosticCategory.Error, key: "JSX element type '{0}' is not a constructor function for JSX elements." },
|
||||
Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: { code: 2606, category: DiagnosticCategory.Error, key: "Property '{0}' of JSX spread attribute is not assignable to target property." },
|
||||
JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: { code: 2607, category: DiagnosticCategory.Error, key: "JSX element class does not support attributes because it does not have a '{0}' property" },
|
||||
The_global_type_JSX_0_may_not_have_more_than_one_property: { code: 2608, category: DiagnosticCategory.Error, key: "The global type 'JSX.{0}' may not have more than one property" },
|
||||
Cannot_emit_namespaced_JSX_elements_in_React: { code: 2650, category: DiagnosticCategory.Error, key: "Cannot emit namespaced JSX elements in React" },
|
||||
A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: { code: 2651, category: DiagnosticCategory.Error, key: "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums." },
|
||||
Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: { code: 2652, category: DiagnosticCategory.Error, key: "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead." },
|
||||
Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: { code: 2653, category: DiagnosticCategory.Error, key: "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'." },
|
||||
Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition: { code: 2654, category: DiagnosticCategory.Error, key: "Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition." },
|
||||
Exported_external_package_typings_can_only_be_in_d_ts_files_Please_contact_the_package_author_to_update_the_package_definition: { code: 2655, category: DiagnosticCategory.Error, key: "Exported external package typings can only be in '.d.ts' files. Please contact the package author to update the package definition." },
|
||||
Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition: { code: 2656, category: DiagnosticCategory.Error, key: "Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition." },
|
||||
Import_declaration_0_is_using_private_name_1: { code: 4000, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
|
||||
Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4006, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." },
|
||||
Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4008, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'." },
|
||||
Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4010, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'." },
|
||||
Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4012, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of public method from exported class has or is using private name '{1}'." },
|
||||
Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4014, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of method from exported interface has or is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4016, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported function has or is using private name '{1}'." },
|
||||
Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4019, category: DiagnosticCategory.Error, key: "Implements clause of exported class '{0}' has or is using private name '{1}'." },
|
||||
Extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: DiagnosticCategory.Error, key: "Extends clause of exported class '{0}' has or is using private name '{1}'." },
|
||||
Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: DiagnosticCategory.Error, key: "Extends clause of exported interface '{0}' has or is using private name '{1}'." },
|
||||
Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4023, category: DiagnosticCategory.Error, key: "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named." },
|
||||
Exported_variable_0_has_or_is_using_name_1_from_private_module_2: { code: 4024, category: DiagnosticCategory.Error, key: "Exported variable '{0}' has or is using name '{1}' from private module '{2}'." },
|
||||
Exported_variable_0_has_or_is_using_private_name_1: { code: 4025, category: DiagnosticCategory.Error, key: "Exported variable '{0}' has or is using private name '{1}'." },
|
||||
Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4026, category: DiagnosticCategory.Error, key: "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." },
|
||||
Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4027, category: DiagnosticCategory.Error, key: "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'." },
|
||||
Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4028, category: DiagnosticCategory.Error, key: "Public static property '{0}' of exported class has or is using private name '{1}'." },
|
||||
Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4029, category: DiagnosticCategory.Error, key: "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." },
|
||||
Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4030, category: DiagnosticCategory.Error, key: "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'." },
|
||||
Public_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4031, category: DiagnosticCategory.Error, key: "Public property '{0}' of exported class has or is using private name '{1}'." },
|
||||
Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4032, category: DiagnosticCategory.Error, key: "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'." },
|
||||
Property_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4033, category: DiagnosticCategory.Error, key: "Property '{0}' of exported interface has or is using private name '{1}'." },
|
||||
Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4034, category: DiagnosticCategory.Error, key: "Parameter '{0}' of public static property setter from exported class has or is using name '{1}' from private module '{2}'." },
|
||||
Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4035, category: DiagnosticCategory.Error, key: "Parameter '{0}' of public static property setter from exported class has or is using private name '{1}'." },
|
||||
Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4036, category: DiagnosticCategory.Error, key: "Parameter '{0}' of public property setter from exported class has or is using name '{1}' from private module '{2}'." },
|
||||
Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4037, category: DiagnosticCategory.Error, key: "Parameter '{0}' of public property setter from exported class has or is using private name '{1}'." },
|
||||
Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4038, category: DiagnosticCategory.Error, key: "Return type of public static property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." },
|
||||
Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4039, category: DiagnosticCategory.Error, key: "Return type of public static property getter from exported class has or is using name '{0}' from private module '{1}'." },
|
||||
Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4040, category: DiagnosticCategory.Error, key: "Return type of public static property getter from exported class has or is using private name '{0}'." },
|
||||
Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4041, category: DiagnosticCategory.Error, key: "Return type of public property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." },
|
||||
Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4042, category: DiagnosticCategory.Error, key: "Return type of public property getter from exported class has or is using name '{0}' from private module '{1}'." },
|
||||
Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4043, category: DiagnosticCategory.Error, key: "Return type of public property getter from exported class has or is using private name '{0}'." },
|
||||
Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4044, category: DiagnosticCategory.Error, key: "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'." },
|
||||
Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4045, category: DiagnosticCategory.Error, key: "Return type of constructor signature from exported interface has or is using private name '{0}'." },
|
||||
Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4046, category: DiagnosticCategory.Error, key: "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'." },
|
||||
Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4047, category: DiagnosticCategory.Error, key: "Return type of call signature from exported interface has or is using private name '{0}'." },
|
||||
Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4048, category: DiagnosticCategory.Error, key: "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'." },
|
||||
Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4049, category: DiagnosticCategory.Error, key: "Return type of index signature from exported interface has or is using private name '{0}'." },
|
||||
Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4050, category: DiagnosticCategory.Error, key: "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named." },
|
||||
Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4051, category: DiagnosticCategory.Error, key: "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'." },
|
||||
Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: { code: 4052, category: DiagnosticCategory.Error, key: "Return type of public static method from exported class has or is using private name '{0}'." },
|
||||
Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4053, category: DiagnosticCategory.Error, key: "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named." },
|
||||
Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4054, category: DiagnosticCategory.Error, key: "Return type of public method from exported class has or is using name '{0}' from private module '{1}'." },
|
||||
Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: { code: 4055, category: DiagnosticCategory.Error, key: "Return type of public method from exported class has or is using private name '{0}'." },
|
||||
Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4056, category: DiagnosticCategory.Error, key: "Return type of method from exported interface has or is using name '{0}' from private module '{1}'." },
|
||||
Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: { code: 4057, category: DiagnosticCategory.Error, key: "Return type of method from exported interface has or is using private name '{0}'." },
|
||||
Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4058, category: DiagnosticCategory.Error, key: "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named." },
|
||||
Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: { code: 4059, category: DiagnosticCategory.Error, key: "Return type of exported function has or is using name '{0}' from private module '{1}'." },
|
||||
Return_type_of_exported_function_has_or_is_using_private_name_0: { code: 4060, category: DiagnosticCategory.Error, key: "Return type of exported function has or is using private name '{0}'." },
|
||||
Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4061, category: DiagnosticCategory.Error, key: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named." },
|
||||
Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4062, category: DiagnosticCategory.Error, key: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'." },
|
||||
Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: { code: 4063, category: DiagnosticCategory.Error, key: "Parameter '{0}' of constructor from exported class has or is using private name '{1}'." },
|
||||
Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4064, category: DiagnosticCategory.Error, key: "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'." },
|
||||
Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4065, category: DiagnosticCategory.Error, key: "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." },
|
||||
Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4066, category: DiagnosticCategory.Error, key: "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'." },
|
||||
Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4067, category: DiagnosticCategory.Error, key: "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'." },
|
||||
Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4068, category: DiagnosticCategory.Error, key: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named." },
|
||||
Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4069, category: DiagnosticCategory.Error, key: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'." },
|
||||
Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4070, category: DiagnosticCategory.Error, key: "Parameter '{0}' of public static method from exported class has or is using private name '{1}'." },
|
||||
Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4071, category: DiagnosticCategory.Error, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named." },
|
||||
Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4072, category: DiagnosticCategory.Error, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'." },
|
||||
Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4073, category: DiagnosticCategory.Error, key: "Parameter '{0}' of public method from exported class has or is using private name '{1}'." },
|
||||
Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4074, category: DiagnosticCategory.Error, key: "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'." },
|
||||
Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4075, category: DiagnosticCategory.Error, key: "Parameter '{0}' of method from exported interface has or is using private name '{1}'." },
|
||||
Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4076, category: DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named." },
|
||||
Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4077, category: DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." },
|
||||
Parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4078, category: DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using private name '{1}'." },
|
||||
Exported_type_alias_0_has_or_is_using_private_name_1: { code: 4081, category: DiagnosticCategory.Error, key: "Exported type alias '{0}' has or is using private name '{1}'." },
|
||||
Default_export_of_the_module_has_or_is_using_private_name_0: { code: 4082, category: DiagnosticCategory.Error, key: "Default export of the module has or is using private name '{0}'." },
|
||||
Loop_contains_block_scoped_variable_0_referenced_by_a_function_in_the_loop_This_is_only_supported_in_ECMAScript_6_or_higher: { code: 4091, category: DiagnosticCategory.Error, key: "Loop contains block-scoped variable '{0}' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher." },
|
||||
The_current_host_does_not_support_the_0_option: { code: 5001, category: DiagnosticCategory.Error, key: "The current host does not support the '{0}' option." },
|
||||
Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: DiagnosticCategory.Error, key: "Cannot find the common subdirectory path for the input files." },
|
||||
Cannot_read_file_0_Colon_1: { code: 5012, category: DiagnosticCategory.Error, key: "Cannot read file '{0}': {1}" },
|
||||
Unsupported_file_encoding: { code: 5013, category: DiagnosticCategory.Error, key: "Unsupported file encoding." },
|
||||
Failed_to_parse_file_0_Colon_1: { code: 5014, category: DiagnosticCategory.Error, key: "Failed to parse file '{0}': {1}." },
|
||||
Unknown_compiler_option_0: { code: 5023, category: DiagnosticCategory.Error, key: "Unknown compiler option '{0}'." },
|
||||
Compiler_option_0_requires_a_value_of_type_1: { code: 5024, category: DiagnosticCategory.Error, key: "Compiler option '{0}' requires a value of type {1}." },
|
||||
Could_not_write_file_0_Colon_1: { code: 5033, category: DiagnosticCategory.Error, key: "Could not write file '{0}': {1}" },
|
||||
Option_project_cannot_be_mixed_with_source_files_on_a_command_line: { code: 5042, category: DiagnosticCategory.Error, key: "Option 'project' cannot be mixed with source files on a command line." },
|
||||
Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES6_or_higher: { code: 5047, category: DiagnosticCategory.Error, key: "Option 'isolatedModules' can only be used when either option'--module' is provided or option 'target' is 'ES6' or higher." },
|
||||
Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: { code: 5051, category: DiagnosticCategory.Error, key: "Option 'inlineSources' can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided." },
|
||||
Option_0_cannot_be_specified_without_specifying_option_1: { code: 5052, category: DiagnosticCategory.Error, key: "Option '{0}' cannot be specified without specifying option '{1}'." },
|
||||
Option_0_cannot_be_specified_with_option_1: { code: 5053, category: DiagnosticCategory.Error, key: "Option '{0}' cannot be specified with option '{1}'." },
|
||||
A_tsconfig_json_file_is_already_defined_at_Colon_0: { code: 5053, category: DiagnosticCategory.Error, key: "A 'tsconfig.json' file is already defined at: '{0}'." },
|
||||
Concatenate_and_emit_output_to_single_file: { code: 6001, category: DiagnosticCategory.Message, key: "Concatenate and emit output to single file." },
|
||||
Generates_corresponding_d_ts_file: { code: 6002, category: DiagnosticCategory.Message, key: "Generates corresponding '.d.ts' file." },
|
||||
Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: { code: 6003, category: DiagnosticCategory.Message, key: "Specifies the location where debugger should locate map files instead of generated locations." },
|
||||
Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: { code: 6004, category: DiagnosticCategory.Message, key: "Specifies the location where debugger should locate TypeScript files instead of source locations." },
|
||||
Watch_input_files: { code: 6005, category: DiagnosticCategory.Message, key: "Watch input files." },
|
||||
Redirect_output_structure_to_the_directory: { code: 6006, category: DiagnosticCategory.Message, key: "Redirect output structure to the directory." },
|
||||
Do_not_erase_const_enum_declarations_in_generated_code: { code: 6007, category: DiagnosticCategory.Message, key: "Do not erase const enum declarations in generated code." },
|
||||
Do_not_emit_outputs_if_any_errors_were_reported: { code: 6008, category: DiagnosticCategory.Message, key: "Do not emit outputs if any errors were reported." },
|
||||
Do_not_emit_comments_to_output: { code: 6009, category: DiagnosticCategory.Message, key: "Do not emit comments to output." },
|
||||
Do_not_emit_outputs: { code: 6010, category: DiagnosticCategory.Message, key: "Do not emit outputs." },
|
||||
Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental: { code: 6015, category: DiagnosticCategory.Message, key: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES6' (experimental)" },
|
||||
Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es6: { code: 6016, category: DiagnosticCategory.Message, key: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es6'" },
|
||||
Print_this_message: { code: 6017, category: DiagnosticCategory.Message, key: "Print this message." },
|
||||
Print_the_compiler_s_version: { code: 6019, category: DiagnosticCategory.Message, key: "Print the compiler's version." },
|
||||
Compile_the_project_in_the_given_directory: { code: 6020, category: DiagnosticCategory.Message, key: "Compile the project in the given directory." },
|
||||
Syntax_Colon_0: { code: 6023, category: DiagnosticCategory.Message, key: "Syntax: {0}" },
|
||||
options: { code: 6024, category: DiagnosticCategory.Message, key: "options" },
|
||||
file: { code: 6025, category: DiagnosticCategory.Message, key: "file" },
|
||||
Examples_Colon_0: { code: 6026, category: DiagnosticCategory.Message, key: "Examples: {0}" },
|
||||
Options_Colon: { code: 6027, category: DiagnosticCategory.Message, key: "Options:" },
|
||||
Version_0: { code: 6029, category: DiagnosticCategory.Message, key: "Version {0}" },
|
||||
Insert_command_line_options_and_files_from_a_file: { code: 6030, category: DiagnosticCategory.Message, key: "Insert command line options and files from a file." },
|
||||
File_change_detected_Starting_incremental_compilation: { code: 6032, category: DiagnosticCategory.Message, key: "File change detected. Starting incremental compilation..." },
|
||||
KIND: { code: 6034, category: DiagnosticCategory.Message, key: "KIND" },
|
||||
FILE: { code: 6035, category: DiagnosticCategory.Message, key: "FILE" },
|
||||
VERSION: { code: 6036, category: DiagnosticCategory.Message, key: "VERSION" },
|
||||
LOCATION: { code: 6037, category: DiagnosticCategory.Message, key: "LOCATION" },
|
||||
DIRECTORY: { code: 6038, category: DiagnosticCategory.Message, key: "DIRECTORY" },
|
||||
Compilation_complete_Watching_for_file_changes: { code: 6042, category: DiagnosticCategory.Message, key: "Compilation complete. Watching for file changes." },
|
||||
Generates_corresponding_map_file: { code: 6043, category: DiagnosticCategory.Message, key: "Generates corresponding '.map' file." },
|
||||
Compiler_option_0_expects_an_argument: { code: 6044, category: DiagnosticCategory.Error, key: "Compiler option '{0}' expects an argument." },
|
||||
Unterminated_quoted_string_in_response_file_0: { code: 6045, category: DiagnosticCategory.Error, key: "Unterminated quoted string in response file '{0}'." },
|
||||
Argument_for_module_option_must_be_commonjs_amd_system_umd_or_es6: { code: 6046, category: DiagnosticCategory.Error, key: "Argument for '--module' option must be 'commonjs', 'amd', 'system', 'umd', or 'es6'." },
|
||||
Argument_for_target_option_must_be_ES3_ES5_or_ES6: { code: 6047, category: DiagnosticCategory.Error, key: "Argument for '--target' option must be 'ES3', 'ES5', or 'ES6'." },
|
||||
Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6048, category: DiagnosticCategory.Error, key: "Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'." },
|
||||
Unsupported_locale_0: { code: 6049, category: DiagnosticCategory.Error, key: "Unsupported locale '{0}'." },
|
||||
Unable_to_open_file_0: { code: 6050, category: DiagnosticCategory.Error, key: "Unable to open file '{0}'." },
|
||||
Corrupted_locale_file_0: { code: 6051, category: DiagnosticCategory.Error, key: "Corrupted locale file {0}." },
|
||||
Raise_error_on_expressions_and_declarations_with_an_implied_any_type: { code: 6052, category: DiagnosticCategory.Message, key: "Raise error on expressions and declarations with an implied 'any' type." },
|
||||
File_0_not_found: { code: 6053, category: DiagnosticCategory.Error, key: "File '{0}' not found." },
|
||||
File_0_has_unsupported_extension_The_only_supported_extensions_are_1: { code: 6054, category: DiagnosticCategory.Error, key: "File '{0}' has unsupported extension. The only supported extensions are {1}." },
|
||||
Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: DiagnosticCategory.Message, key: "Suppress noImplicitAny errors for indexing objects lacking index signatures." },
|
||||
Do_not_emit_declarations_for_code_that_has_an_internal_annotation: { code: 6056, category: DiagnosticCategory.Message, key: "Do not emit declarations for code that has an '@internal' annotation." },
|
||||
Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: { code: 6058, category: DiagnosticCategory.Message, key: "Specifies the root directory of input files. Use to control the output directory structure with --outDir." },
|
||||
File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: { code: 6059, category: DiagnosticCategory.Error, key: "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files." },
|
||||
Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: { code: 6060, category: DiagnosticCategory.Message, key: "Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)." },
|
||||
NEWLINE: { code: 6061, category: DiagnosticCategory.Message, key: "NEWLINE" },
|
||||
Argument_for_newLine_option_must_be_CRLF_or_LF: { code: 6062, category: DiagnosticCategory.Error, key: "Argument for '--newLine' option must be 'CRLF' or 'LF'." },
|
||||
Specify_JSX_code_generation_Colon_preserve_or_react: { code: 6080, category: DiagnosticCategory.Message, key: "Specify JSX code generation: 'preserve' or 'react'" },
|
||||
Argument_for_jsx_must_be_preserve_or_react: { code: 6081, category: DiagnosticCategory.Message, key: "Argument for '--jsx' must be 'preserve' or 'react'." },
|
||||
Enables_experimental_support_for_ES7_decorators: { code: 6065, category: DiagnosticCategory.Message, key: "Enables experimental support for ES7 decorators." },
|
||||
Enables_experimental_support_for_emitting_type_metadata_for_decorators: { code: 6066, category: DiagnosticCategory.Message, key: "Enables experimental support for emitting type metadata for decorators." },
|
||||
Option_experimentalAsyncFunctions_cannot_be_specified_when_targeting_ES5_or_lower: { code: 6067, category: DiagnosticCategory.Message, key: "Option 'experimentalAsyncFunctions' cannot be specified when targeting ES5 or lower." },
|
||||
Enables_experimental_support_for_ES7_async_functions: { code: 6068, category: DiagnosticCategory.Message, key: "Enables experimental support for ES7 async functions." },
|
||||
Specifies_module_resolution_strategy_Colon_node_Node_or_classic_TypeScript_pre_1_6: { code: 6069, category: DiagnosticCategory.Message, key: "Specifies module resolution strategy: 'node' (Node) or 'classic' (TypeScript pre 1.6) ." },
|
||||
Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: { code: 6070, category: DiagnosticCategory.Message, key: "Initializes a TypeScript project and creates a tsconfig.json file." },
|
||||
Successfully_created_a_tsconfig_json_file: { code: 6071, category: DiagnosticCategory.Message, key: "Successfully created a tsconfig.json file." },
|
||||
Suppress_excess_property_checks_for_object_literals: { code: 6072, category: DiagnosticCategory.Message, key: "Suppress excess property checks for object literals." },
|
||||
Variable_0_implicitly_has_an_1_type: { code: 7005, category: DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." },
|
||||
Parameter_0_implicitly_has_an_1_type: { code: 7006, category: DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." },
|
||||
Member_0_implicitly_has_an_1_type: { code: 7008, category: DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." },
|
||||
new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: { code: 7009, category: DiagnosticCategory.Error, key: "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type." },
|
||||
_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: { code: 7010, category: DiagnosticCategory.Error, key: "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type." },
|
||||
Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: { code: 7011, category: DiagnosticCategory.Error, key: "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type." },
|
||||
Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7013, category: DiagnosticCategory.Error, key: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type." },
|
||||
Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation: { code: 7016, category: DiagnosticCategory.Error, key: "Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation." },
|
||||
Index_signature_of_object_type_implicitly_has_an_any_type: { code: 7017, category: DiagnosticCategory.Error, key: "Index signature of object type implicitly has an 'any' type." },
|
||||
Object_literal_s_property_0_implicitly_has_an_1_type: { code: 7018, category: DiagnosticCategory.Error, key: "Object literal's property '{0}' implicitly has an '{1}' type." },
|
||||
Rest_parameter_0_implicitly_has_an_any_type: { code: 7019, category: DiagnosticCategory.Error, key: "Rest parameter '{0}' implicitly has an 'any[]' type." },
|
||||
Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7020, category: DiagnosticCategory.Error, key: "Call signature, which lacks return-type annotation, implicitly has an 'any' return type." },
|
||||
_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: { code: 7022, category: DiagnosticCategory.Error, key: "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer." },
|
||||
_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7023, category: DiagnosticCategory.Error, key: "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
|
||||
Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7024, category: DiagnosticCategory.Error, key: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
|
||||
Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type: { code: 7025, category: DiagnosticCategory.Error, key: "Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type." },
|
||||
JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: { code: 7026, category: DiagnosticCategory.Error, key: "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists" },
|
||||
You_cannot_rename_this_element: { code: 8000, category: DiagnosticCategory.Error, key: "You cannot rename this element." },
|
||||
You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: DiagnosticCategory.Error, key: "You cannot rename elements that are defined in the standard TypeScript library." },
|
||||
import_can_only_be_used_in_a_ts_file: { code: 8002, category: DiagnosticCategory.Error, key: "'import ... =' can only be used in a .ts file." },
|
||||
export_can_only_be_used_in_a_ts_file: { code: 8003, category: DiagnosticCategory.Error, key: "'export=' can only be used in a .ts file." },
|
||||
type_parameter_declarations_can_only_be_used_in_a_ts_file: { code: 8004, category: DiagnosticCategory.Error, key: "'type parameter declarations' can only be used in a .ts file." },
|
||||
implements_clauses_can_only_be_used_in_a_ts_file: { code: 8005, category: DiagnosticCategory.Error, key: "'implements clauses' can only be used in a .ts file." },
|
||||
interface_declarations_can_only_be_used_in_a_ts_file: { code: 8006, category: DiagnosticCategory.Error, key: "'interface declarations' can only be used in a .ts file." },
|
||||
module_declarations_can_only_be_used_in_a_ts_file: { code: 8007, category: DiagnosticCategory.Error, key: "'module declarations' can only be used in a .ts file." },
|
||||
type_aliases_can_only_be_used_in_a_ts_file: { code: 8008, category: DiagnosticCategory.Error, key: "'type aliases' can only be used in a .ts file." },
|
||||
_0_can_only_be_used_in_a_ts_file: { code: 8009, category: DiagnosticCategory.Error, key: "'{0}' can only be used in a .ts file." },
|
||||
types_can_only_be_used_in_a_ts_file: { code: 8010, category: DiagnosticCategory.Error, key: "'types' can only be used in a .ts file." },
|
||||
type_arguments_can_only_be_used_in_a_ts_file: { code: 8011, category: DiagnosticCategory.Error, key: "'type arguments' can only be used in a .ts file." },
|
||||
parameter_modifiers_can_only_be_used_in_a_ts_file: { code: 8012, category: DiagnosticCategory.Error, key: "'parameter modifiers' can only be used in a .ts file." },
|
||||
property_declarations_can_only_be_used_in_a_ts_file: { code: 8014, category: DiagnosticCategory.Error, key: "'property declarations' can only be used in a .ts file." },
|
||||
enum_declarations_can_only_be_used_in_a_ts_file: { code: 8015, category: DiagnosticCategory.Error, key: "'enum declarations' can only be used in a .ts file." },
|
||||
type_assertion_expressions_can_only_be_used_in_a_ts_file: { code: 8016, category: DiagnosticCategory.Error, key: "'type assertion expressions' can only be used in a .ts file." },
|
||||
decorators_can_only_be_used_in_a_ts_file: { code: 8017, category: DiagnosticCategory.Error, key: "'decorators' can only be used in a .ts file." },
|
||||
Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses: { code: 9002, category: DiagnosticCategory.Error, key: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses." },
|
||||
class_expressions_are_not_currently_supported: { code: 9003, category: DiagnosticCategory.Error, key: "'class' expressions are not currently supported." },
|
||||
JSX_attributes_must_only_be_assigned_a_non_empty_expression: { code: 17000, category: DiagnosticCategory.Error, key: "JSX attributes must only be assigned a non-empty 'expression'." },
|
||||
JSX_elements_cannot_have_multiple_attributes_with_the_same_name: { code: 17001, category: DiagnosticCategory.Error, key: "JSX elements cannot have multiple attributes with the same name." },
|
||||
Expected_corresponding_JSX_closing_tag_for_0: { code: 17002, category: DiagnosticCategory.Error, key: "Expected corresponding JSX closing tag for '{0}'." },
|
||||
JSX_attribute_expected: { code: 17003, category: DiagnosticCategory.Error, key: "JSX attribute expected." },
|
||||
Cannot_use_JSX_unless_the_jsx_flag_is_provided: { code: 17004, category: DiagnosticCategory.Error, key: "Cannot use JSX unless the '--jsx' flag is provided." },
|
||||
A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: DiagnosticCategory.Error, key: "A constructor cannot contain a 'super' call when its class extends 'null'" },
|
||||
};
|
||||
}
|
||||
@ -549,7 +549,7 @@
|
||||
},
|
||||
"An implementation cannot be declared in ambient contexts.": {
|
||||
"category": "Error",
|
||||
"code": 1184
|
||||
"code": 1183
|
||||
},
|
||||
"Modifiers cannot appear here.": {
|
||||
"category": "Error",
|
||||
@ -747,24 +747,6 @@
|
||||
"category": "Error",
|
||||
"code": 1235
|
||||
},
|
||||
"Experimental support for async functions is a feature that is subject to change in a future release. Specify '--experimentalAsyncFunctions' to remove this warning.": {
|
||||
"category": "Error",
|
||||
"code": 1236
|
||||
},
|
||||
|
||||
|
||||
"'with' statements are not allowed in an async function block.": {
|
||||
"category": "Error",
|
||||
"code": 1300
|
||||
},
|
||||
"'await' expression is only allowed within an async function.": {
|
||||
"category": "Error",
|
||||
"code": 1308
|
||||
},
|
||||
"Async functions are only available when targeting ECMAScript 6 and higher.": {
|
||||
"category": "Error",
|
||||
"code": 1311
|
||||
},
|
||||
"The return type of a property decorator function must be either 'void' or 'any'.": {
|
||||
"category": "Error",
|
||||
"code": 1236
|
||||
@ -805,6 +787,23 @@
|
||||
"category": "Error",
|
||||
"code": 1245
|
||||
},
|
||||
"Experimental support for async functions is a feature that is subject to change in a future release. Specify '--experimentalAsyncFunctions' to remove this warning.": {
|
||||
"category": "Error",
|
||||
"code": 1246
|
||||
},
|
||||
|
||||
"'with' statements are not allowed in an async function block.": {
|
||||
"category": "Error",
|
||||
"code": 1300
|
||||
},
|
||||
"'await' expression is only allowed within an async function.": {
|
||||
"category": "Error",
|
||||
"code": 1308
|
||||
},
|
||||
"Async functions are only available when targeting ECMAScript 6 and higher.": {
|
||||
"category": "Error",
|
||||
"code": 1311
|
||||
},
|
||||
"Duplicate identifier '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2300
|
||||
@ -2055,7 +2054,7 @@
|
||||
},
|
||||
"A 'tsconfig.json' file is already defined at: '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 5053
|
||||
"code": 5054
|
||||
},
|
||||
|
||||
"Concatenate and emit output to single file.": {
|
||||
@ -2250,6 +2249,11 @@
|
||||
"category": "Error",
|
||||
"code": 6062
|
||||
},
|
||||
"Argument for '--moduleResolution' option must be 'node' or 'classic'.": {
|
||||
"category": "Error",
|
||||
"code": 6063
|
||||
},
|
||||
|
||||
"Specify JSX code generation: 'preserve' or 'react'": {
|
||||
"category": "Message",
|
||||
"code": 6080
|
||||
@ -2274,7 +2278,7 @@
|
||||
"category": "Message",
|
||||
"code": 6068
|
||||
},
|
||||
"Specifies module resolution strategy: 'node' (Node) or 'classic' (TypeScript pre 1.6) .": {
|
||||
"Specifies module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6).": {
|
||||
"category": "Message",
|
||||
"code": 6069
|
||||
},
|
||||
|
||||
@ -1524,8 +1524,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
else if (declaration.kind === SyntaxKind.ImportSpecifier) {
|
||||
// Identifier references named import
|
||||
write(getGeneratedNameForNode(<ImportDeclaration>declaration.parent.parent.parent));
|
||||
write(".");
|
||||
writeTextOfNode(currentSourceFile, (<ImportSpecifier>declaration).propertyName || (<ImportSpecifier>declaration).name);
|
||||
var name = (<ImportSpecifier>declaration).propertyName || (<ImportSpecifier>declaration).name;
|
||||
var identifier = getSourceTextOfNodeFromSourceFile(currentSourceFile, name);
|
||||
if (languageVersion === ScriptTarget.ES3 && identifier === "default") {
|
||||
write(`["default"]`);
|
||||
}
|
||||
else {
|
||||
write(".");
|
||||
write(identifier);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -3229,22 +3236,32 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
}
|
||||
}
|
||||
|
||||
function ensureIdentifier(expr: Expression): Expression {
|
||||
if (expr.kind !== SyntaxKind.Identifier) {
|
||||
let identifier = createTempVariable(TempFlags.Auto);
|
||||
if (!canDefineTempVariablesInPlace) {
|
||||
recordTempDeclaration(identifier);
|
||||
}
|
||||
emitAssignment(identifier, expr);
|
||||
expr = identifier;
|
||||
/**
|
||||
* Ensures that there exists a declared identifier whose value holds the given expression.
|
||||
* This function is useful to ensure that the expression's value can be read from in subsequent expressions.
|
||||
* Unless 'reuseIdentifierExpressions' is false, 'expr' will be returned if it is just an identifier.
|
||||
*
|
||||
* @param expr the expression whose value needs to be bound.
|
||||
* @param reuseIdentifierExpressions true if identifier expressions can simply be returned;
|
||||
* false if it is necessary to always emit an identifier.
|
||||
*/
|
||||
function ensureIdentifier(expr: Expression, reuseIdentifierExpressions: boolean): Expression {
|
||||
if (expr.kind === SyntaxKind.Identifier && reuseIdentifierExpressions) {
|
||||
return expr;
|
||||
}
|
||||
return expr;
|
||||
|
||||
let identifier = createTempVariable(TempFlags.Auto);
|
||||
if (!canDefineTempVariablesInPlace) {
|
||||
recordTempDeclaration(identifier);
|
||||
}
|
||||
emitAssignment(identifier, expr);
|
||||
return identifier;
|
||||
}
|
||||
|
||||
function createDefaultValueCheck(value: Expression, defaultValue: Expression): Expression {
|
||||
// The value expression will be evaluated twice, so for anything but a simple identifier
|
||||
// we need to generate a temporary variable
|
||||
value = ensureIdentifier(value);
|
||||
value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true);
|
||||
// Return the expression 'value === void 0 ? defaultValue : value'
|
||||
let equals = <BinaryExpression>createSynthesizedNode(SyntaxKind.BinaryExpression);
|
||||
equals.left = value;
|
||||
@ -3295,7 +3312,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
if (properties.length !== 1) {
|
||||
// For anything but a single element destructuring we need to generate a temporary
|
||||
// to ensure value is evaluated exactly once.
|
||||
value = ensureIdentifier(value);
|
||||
value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true);
|
||||
}
|
||||
for (let p of properties) {
|
||||
if (p.kind === SyntaxKind.PropertyAssignment || p.kind === SyntaxKind.ShorthandPropertyAssignment) {
|
||||
@ -3310,7 +3327,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
if (elements.length !== 1) {
|
||||
// For anything but a single element destructuring we need to generate a temporary
|
||||
// to ensure value is evaluated exactly once.
|
||||
value = ensureIdentifier(value);
|
||||
value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true);
|
||||
}
|
||||
for (let i = 0; i < elements.length; i++) {
|
||||
let e = elements[i];
|
||||
@ -3355,7 +3372,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
if (root.parent.kind !== SyntaxKind.ParenthesizedExpression) {
|
||||
write("(");
|
||||
}
|
||||
value = ensureIdentifier(value);
|
||||
value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true);
|
||||
emitDestructuringAssignment(target, value);
|
||||
write(", ");
|
||||
emit(value);
|
||||
@ -3365,7 +3382,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
}
|
||||
}
|
||||
|
||||
function emitBindingElement(target: BindingElement, value: Expression) {
|
||||
function emitBindingElement(target: BindingElement | VariableDeclaration, value: Expression) {
|
||||
if (target.initializer) {
|
||||
// Combine value and initializer
|
||||
value = value ? createDefaultValueCheck(value, target.initializer) : target.initializer;
|
||||
@ -3375,14 +3392,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
value = createVoidZero();
|
||||
}
|
||||
if (isBindingPattern(target.name)) {
|
||||
let pattern = <BindingPattern>target.name;
|
||||
let elements = pattern.elements;
|
||||
if (elements.length !== 1) {
|
||||
// For anything but a single element destructuring we need to generate a temporary
|
||||
// to ensure value is evaluated exactly once.
|
||||
value = ensureIdentifier(value);
|
||||
const pattern = <BindingPattern>target.name;
|
||||
const elements = pattern.elements;
|
||||
const numElements = elements.length;
|
||||
|
||||
if (numElements !== 1) {
|
||||
// For anything other than a single-element destructuring we need to generate a temporary
|
||||
// to ensure value is evaluated exactly once. Additionally, if we have zero elements
|
||||
// we need to emit *something* to ensure that in case a 'var' keyword was already emitted,
|
||||
// so in that case, we'll intentionally create that temporary.
|
||||
value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ numElements !== 0);
|
||||
}
|
||||
for (let i = 0; i < elements.length; i++) {
|
||||
|
||||
for (let i = 0; i < numElements; i++) {
|
||||
let element = elements[i];
|
||||
if (pattern.kind === SyntaxKind.ObjectBindingPattern) {
|
||||
// Rewrite element to a declaration with an initializer that fetches property
|
||||
@ -3394,7 +3416,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
// Rewrite element to a declaration that accesses array element at index i
|
||||
emitBindingElement(element, createElementAccessExpression(value, createNumericLiteral(i)));
|
||||
}
|
||||
else if (i === elements.length - 1) {
|
||||
else if (i === numElements - 1) {
|
||||
emitBindingElement(element, createSliceCall(value, i));
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ namespace ts {
|
||||
|
||||
let emptyArray: any[] = [];
|
||||
|
||||
export const version = "1.6.0";
|
||||
export const version = "1.7.0";
|
||||
|
||||
export function findConfigFile(searchPath: string): string {
|
||||
let fileName = "tsconfig.json";
|
||||
@ -862,8 +862,8 @@ namespace ts {
|
||||
const importedFile = findModuleSourceFile(resolution.resolvedFileName, file.imports[i]);
|
||||
if (importedFile && resolution.isExternalLibraryImport) {
|
||||
if (!isExternalModule(importedFile)) {
|
||||
let start = getTokenPosOfNode(file.imports[i], file)
|
||||
fileProcessingDiagnostics.add(createFileDiagnostic(file, start, file.imports[i].end - start, Diagnostics.Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition, importedFile.fileName));
|
||||
let start = getTokenPosOfNode(file.imports[i], file)
|
||||
fileProcessingDiagnostics.add(createFileDiagnostic(file, start, file.imports[i].end - start, Diagnostics.Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition, importedFile.fileName));
|
||||
}
|
||||
else if (!fileExtensionIs(importedFile.fileName, ".d.ts")) {
|
||||
let start = getTokenPosOfNode(file.imports[i], file)
|
||||
|
||||
@ -2117,17 +2117,30 @@ namespace ts {
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export interface CommandLineOption {
|
||||
export interface CommandLineOptionBase {
|
||||
name: string;
|
||||
type: string | Map<number>; // "string", "number", "boolean", or an object literal mapping named values to actual values
|
||||
isFilePath?: boolean; // True if option value is a path or fileName
|
||||
shortName?: string; // A short mnemonic for convenience - for instance, 'h' can be used in place of 'help'
|
||||
description?: DiagnosticMessage; // The message describing what the command line switch does
|
||||
paramType?: DiagnosticMessage; // The name to be used for a non-boolean option's parameter
|
||||
error?: DiagnosticMessage; // The error given when the argument does not fit a customized 'type'
|
||||
experimental?: boolean;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export interface CommandLineOptionOfPrimitiveType extends CommandLineOptionBase {
|
||||
type: string; // "string" | "number" | "boolean"
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export interface CommandLineOptionOfCustomType extends CommandLineOptionBase {
|
||||
type: Map<number>; // an object literal mapping named values to actual values
|
||||
error: DiagnosticMessage; // The error given when the argument does not fit a customized 'type'
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export type CommandLineOption = CommandLineOptionOfCustomType | CommandLineOptionOfPrimitiveType;
|
||||
|
||||
/* @internal */
|
||||
export const enum CharacterCodes {
|
||||
nullCharacter = 0,
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
/// <reference path="binder.ts" />
|
||||
/// <reference path="sys.ts" />
|
||||
|
||||
/* @internal */
|
||||
namespace ts {
|
||||
@ -164,16 +165,16 @@ namespace ts {
|
||||
return node.pos;
|
||||
}
|
||||
|
||||
// Returns true if this node is missing from the actual source code. 'missing' is different
|
||||
// from 'undefined/defined'. When a node is undefined (which can happen for optional nodes
|
||||
// in the tree), it is definitel missing. HOwever, a node may be defined, but still be
|
||||
// Returns true if this node is missing from the actual source code. A 'missing' node is different
|
||||
// from 'undefined/defined'. When a node is undefined (which can happen for optional nodes
|
||||
// in the tree), it is definitely missing. However, a node may be defined, but still be
|
||||
// missing. This happens whenever the parser knows it needs to parse something, but can't
|
||||
// get anything in the source code that it expects at that location. For example:
|
||||
// get anything in the source code that it expects at that location. For example:
|
||||
//
|
||||
// let a: ;
|
||||
//
|
||||
// Here, the Type in the Type-Annotation is not-optional (as there is a colon in the source
|
||||
// code). So the parser will attempt to parse out a type, and will create an actual node.
|
||||
// code). So the parser will attempt to parse out a type, and will create an actual node.
|
||||
// However, this node will be 'missing' in the sense that no actual source-code/tokens are
|
||||
// contained within it.
|
||||
export function nodeIsMissing(node: Node) {
|
||||
@ -660,7 +661,7 @@ namespace ts {
|
||||
return node && node.kind === SyntaxKind.Block && isFunctionLike(node.parent);
|
||||
}
|
||||
|
||||
export function isObjectLiteralMethod(node: Node) {
|
||||
export function isObjectLiteralMethod(node: Node): node is MethodDeclaration {
|
||||
return node && node.kind === SyntaxKind.MethodDeclaration && node.parent.kind === SyntaxKind.ObjectLiteralExpression;
|
||||
}
|
||||
|
||||
|
||||
@ -428,6 +428,7 @@ module Harness {
|
||||
args(): string[];
|
||||
getExecutingFilePath(): string;
|
||||
exit(exitCode?: number): void;
|
||||
readDirectory(path: string, extension?: string, exclude?: string[]): string[];
|
||||
}
|
||||
export var IO: IO;
|
||||
|
||||
@ -464,6 +465,7 @@ module Harness {
|
||||
export const directoryExists: typeof IO.directoryExists = fso.FolderExists;
|
||||
export const fileExists: typeof IO.fileExists = fso.FileExists;
|
||||
export const log: typeof IO.log = global.WScript && global.WScript.StdOut.WriteLine;
|
||||
export const readDirectory: typeof IO.readDirectory = (path, extension, exclude) => ts.sys.readDirectory(path, extension, exclude);
|
||||
|
||||
export function createDirectory(path: string) {
|
||||
if (directoryExists(path)) {
|
||||
@ -532,6 +534,8 @@ module Harness {
|
||||
export const fileExists: typeof IO.fileExists = fs.existsSync;
|
||||
export const log: typeof IO.log = s => console.log(s);
|
||||
|
||||
export const readDirectory: typeof IO.readDirectory = (path, extension, exclude) => ts.sys.readDirectory(path, extension, exclude);
|
||||
|
||||
export function createDirectory(path: string) {
|
||||
if (!directoryExists(path)) {
|
||||
fs.mkdirSync(path);
|
||||
@ -730,6 +734,10 @@ module Harness {
|
||||
export function writeFile(path: string, contents: string) {
|
||||
Http.writeToServerSync(serverRoot + path, "WRITE", contents);
|
||||
}
|
||||
|
||||
export function readDirectory(path: string, extension?: string, exclude?: string[]) {
|
||||
return listFiles(path).filter(f => !extension || ts.fileExtensionIs(f, extension));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,11 +3,15 @@ var fs: any = require('fs');
|
||||
var path: any = require('path');
|
||||
|
||||
function instrumentForRecording(fn: string, tscPath: string) {
|
||||
instrument(tscPath, 'ts.sys = Playback.wrapSystem(ts.sys); ts.sys.startRecord("' + fn + '");', 'ts.sys.endRecord();');
|
||||
instrument(tscPath, `
|
||||
ts.sys = Playback.wrapSystem(ts.sys);
|
||||
ts.sys.startRecord("${ fn }");`, `ts.sys.endRecord();`);
|
||||
}
|
||||
|
||||
function instrumentForReplay(logFilename: string, tscPath: string) {
|
||||
instrument(tscPath, 'ts.sys = Playback.wrapSystem(ts.sys); ts.sys.startReplay("' + logFilename + '");');
|
||||
instrument(tscPath, `
|
||||
ts.sys = Playback.wrapSystem(ts.sys);
|
||||
ts.sys.startReplay("${ logFilename }");`);
|
||||
}
|
||||
|
||||
function instrument(tscPath: string, prepareCode: string, cleanupCode: string = '') {
|
||||
|
||||
@ -59,6 +59,12 @@ interface IOLog {
|
||||
path: string;
|
||||
result?: string;
|
||||
}[];
|
||||
directoriesRead: {
|
||||
path: string,
|
||||
extension: string,
|
||||
exclude: string[],
|
||||
result: string[]
|
||||
}[];
|
||||
}
|
||||
|
||||
interface PlaybackControl {
|
||||
@ -95,12 +101,15 @@ module Playback {
|
||||
|
||||
export interface PlaybackIO extends Harness.IO, PlaybackControl { }
|
||||
|
||||
export interface PlaybackSystem extends ts.System, PlaybackControl { }
|
||||
|
||||
function createEmptyLog(): IOLog {
|
||||
return {
|
||||
timestamp: (new Date()).toString(),
|
||||
arguments: [],
|
||||
currentDirectory: "",
|
||||
filesRead: [],
|
||||
directoriesRead: [],
|
||||
filesWritten: [],
|
||||
filesDeleted: [],
|
||||
filesAppended: [],
|
||||
@ -114,8 +123,10 @@ module Playback {
|
||||
};
|
||||
}
|
||||
|
||||
function initWrapper<T>(wrapper: PlaybackControl, underlying: T) {
|
||||
Object.keys(underlying).forEach(prop => {
|
||||
function initWrapper(wrapper: PlaybackSystem, underlying: ts.System): void;
|
||||
function initWrapper(wrapper: PlaybackIO, underlying: Harness.IO): void;
|
||||
function initWrapper(wrapper: PlaybackSystem | PlaybackIO, underlying: ts.System | Harness.IO): void {
|
||||
ts.forEach(Object.keys(underlying), prop => {
|
||||
(<any>wrapper)[prop] = (<any>underlying)[prop];
|
||||
});
|
||||
|
||||
@ -135,6 +146,93 @@ module Playback {
|
||||
wrapper.startRecord = (fileNameBase) => {
|
||||
recordLogFileNameBase = fileNameBase;
|
||||
recordLog = createEmptyLog();
|
||||
|
||||
if (typeof underlying.args !== "function") {
|
||||
recordLog.arguments = <string[]>underlying.args;
|
||||
}
|
||||
};
|
||||
|
||||
wrapper.startReplayFromFile = logFn => {
|
||||
wrapper.startReplayFromString(underlying.readFile(logFn));
|
||||
};
|
||||
wrapper.endRecord = () => {
|
||||
if (recordLog !== undefined) {
|
||||
let i = 0;
|
||||
let fn = () => recordLogFileNameBase + i + ".json";
|
||||
while (underlying.fileExists(fn())) i++;
|
||||
underlying.writeFile(fn(), JSON.stringify(recordLog));
|
||||
recordLog = undefined;
|
||||
}
|
||||
};
|
||||
|
||||
wrapper.fileExists = recordReplay(wrapper.fileExists, underlying)(
|
||||
path => callAndRecord(underlying.fileExists(path), recordLog.fileExists, { path }),
|
||||
memoize(path => {
|
||||
// If we read from the file, it must exist
|
||||
if (findResultByPath(wrapper, replayLog.filesRead, path, null) !== null) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return findResultByFields(replayLog.fileExists, { path }, false);
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
wrapper.getExecutingFilePath = () => {
|
||||
if (replayLog !== undefined) {
|
||||
return replayLog.executingPath;
|
||||
}
|
||||
else if (recordLog !== undefined) {
|
||||
return recordLog.executingPath = underlying.getExecutingFilePath();
|
||||
}
|
||||
else {
|
||||
return underlying.getExecutingFilePath();
|
||||
}
|
||||
};
|
||||
|
||||
wrapper.getCurrentDirectory = () => {
|
||||
if (replayLog !== undefined) {
|
||||
return replayLog.currentDirectory || "";
|
||||
}
|
||||
else if (recordLog !== undefined) {
|
||||
return recordLog.currentDirectory = underlying.getCurrentDirectory();
|
||||
}
|
||||
else {
|
||||
return underlying.getCurrentDirectory();
|
||||
}
|
||||
};
|
||||
|
||||
wrapper.resolvePath = recordReplay(wrapper.resolvePath, underlying)(
|
||||
path => callAndRecord(underlying.resolvePath(path), recordLog.pathsResolved, { path }),
|
||||
memoize(path => findResultByFields(replayLog.pathsResolved, { path }, !ts.isRootedDiskPath(ts.normalizeSlashes(path)) && replayLog.currentDirectory ? replayLog.currentDirectory + "/" + path : ts.normalizeSlashes(path))));
|
||||
|
||||
wrapper.readFile = recordReplay(wrapper.readFile, underlying)(
|
||||
path => {
|
||||
let result = underlying.readFile(path);
|
||||
let logEntry = { path, codepage: 0, result: { contents: result, codepage: 0 } };
|
||||
recordLog.filesRead.push(logEntry);
|
||||
return result;
|
||||
},
|
||||
memoize(path => findResultByPath(wrapper, replayLog.filesRead, path).contents));
|
||||
|
||||
wrapper.readDirectory = recordReplay(wrapper.readDirectory, underlying)(
|
||||
(path, extension, exclude) => {
|
||||
let result = (<ts.System>underlying).readDirectory(path, extension, exclude);
|
||||
let logEntry = { path, extension, exclude, result };
|
||||
recordLog.directoriesRead.push(logEntry);
|
||||
return result;
|
||||
},
|
||||
(path, extension, exclude) => findResultByPath(wrapper, replayLog.directoriesRead.filter(d => d.extension === extension && ts.arrayIsEqualTo(d.exclude, exclude)), path));
|
||||
|
||||
wrapper.writeFile = recordReplay(wrapper.writeFile, underlying)(
|
||||
(path, contents) => callAndRecord(underlying.writeFile(path, contents), recordLog.filesWritten, { path, contents, bom: false }),
|
||||
(path, contents) => noOpReplay("writeFile"));
|
||||
|
||||
wrapper.exit = (exitCode) => {
|
||||
if (recordLog !== undefined) {
|
||||
wrapper.endRecord();
|
||||
}
|
||||
underlying.exit(exitCode);
|
||||
};
|
||||
}
|
||||
|
||||
@ -143,9 +241,11 @@ module Playback {
|
||||
return <any>(function () {
|
||||
if (replayLog !== undefined) {
|
||||
return replay.apply(undefined, arguments);
|
||||
} else if (recordLog !== undefined) {
|
||||
}
|
||||
else if (recordLog !== undefined) {
|
||||
return record.apply(undefined, arguments);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return original.apply(underlying, arguments);
|
||||
}
|
||||
});
|
||||
@ -169,7 +269,8 @@ module Playback {
|
||||
if (results.length === 0) {
|
||||
if (defaultValue !== undefined) {
|
||||
return defaultValue;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
throw new Error("No matching result in log array for: " + JSON.stringify(expectedFields));
|
||||
}
|
||||
}
|
||||
@ -177,7 +278,7 @@ module Playback {
|
||||
}
|
||||
|
||||
function findResultByPath<T>(wrapper: { resolvePath(s: string): string }, logArray: { path: string; result?: T }[], expectedPath: string, defaultValue?: T): T {
|
||||
let normalizedName = ts.normalizeSlashes(expectedPath).toLowerCase();
|
||||
let normalizedName = ts.normalizePath(expectedPath).toLowerCase();
|
||||
// Try to find the result through normal fileName
|
||||
for (let i = 0; i < logArray.length; i++) {
|
||||
if (ts.normalizeSlashes(logArray[i].path).toLowerCase() === normalizedName) {
|
||||
@ -193,10 +294,12 @@ module Playback {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If we got here, we didn't find a match
|
||||
if (defaultValue === undefined) {
|
||||
throw new Error("No matching result in log array for path: " + expectedPath);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
@ -214,7 +317,8 @@ module Playback {
|
||||
}
|
||||
if (pathEquivCache.hasOwnProperty(key)) {
|
||||
return pathEquivCache[key];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return pathEquivCache[key] = check();
|
||||
}
|
||||
}
|
||||
@ -227,93 +331,18 @@ module Playback {
|
||||
let wrapper: PlaybackIO = <any>{};
|
||||
initWrapper(wrapper, underlying);
|
||||
|
||||
wrapper.startReplayFromFile = logFn => {
|
||||
wrapper.startReplayFromString(underlying.readFile(logFn));
|
||||
};
|
||||
wrapper.endRecord = () => {
|
||||
if (recordLog !== undefined) {
|
||||
let i = 0;
|
||||
let fn = () => recordLogFileNameBase + i + ".json";
|
||||
while (underlying.fileExists(fn())) i++;
|
||||
underlying.writeFile(fn(), JSON.stringify(recordLog));
|
||||
recordLog = undefined;
|
||||
}
|
||||
};
|
||||
|
||||
wrapper.args = () => {
|
||||
if (replayLog !== undefined) {
|
||||
return replayLog.arguments;
|
||||
} else if (recordLog !== undefined) {
|
||||
recordLog.arguments = underlying.args();
|
||||
}
|
||||
return underlying.args();
|
||||
}
|
||||
|
||||
wrapper.newLine = () => underlying.newLine();
|
||||
wrapper.useCaseSensitiveFileNames = () => underlying.useCaseSensitiveFileNames();
|
||||
wrapper.directoryName = (path): string => { throw new Error("NotSupported"); };
|
||||
wrapper.createDirectory = path => { throw new Error("NotSupported"); };
|
||||
wrapper.createDirectory = (path): void => { throw new Error("NotSupported"); };
|
||||
wrapper.directoryExists = (path): boolean => { throw new Error("NotSupported"); };
|
||||
wrapper.deleteFile = path => { throw new Error("NotSupported"); };
|
||||
wrapper.deleteFile = (path): void => { throw new Error("NotSupported"); };
|
||||
wrapper.listFiles = (path, filter, options): string[] => { throw new Error("NotSupported"); };
|
||||
wrapper.log = text => underlying.log(text);
|
||||
|
||||
wrapper.fileExists = recordReplay(wrapper.fileExists, underlying)(
|
||||
(path) => callAndRecord(underlying.fileExists(path), recordLog.fileExists, { path: path }),
|
||||
memoize((path) => {
|
||||
// If we read from the file, it must exist
|
||||
if (findResultByPath(wrapper, replayLog.filesRead, path, null) !== null) {
|
||||
return true;
|
||||
} else {
|
||||
return findResultByFields(replayLog.fileExists, { path: path }, false);
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
wrapper.getExecutingFilePath = () => {
|
||||
if (replayLog !== undefined) {
|
||||
return replayLog.executingPath;
|
||||
} else if (recordLog !== undefined) {
|
||||
return recordLog.executingPath = underlying.getExecutingFilePath();
|
||||
} else {
|
||||
return underlying.getExecutingFilePath();
|
||||
}
|
||||
};
|
||||
|
||||
wrapper.getCurrentDirectory = () => {
|
||||
if (replayLog !== undefined) {
|
||||
return replayLog.currentDirectory || "";
|
||||
} else if (recordLog !== undefined) {
|
||||
return recordLog.currentDirectory = underlying.getCurrentDirectory();
|
||||
} else {
|
||||
return underlying.getCurrentDirectory();
|
||||
}
|
||||
};
|
||||
|
||||
wrapper.resolvePath = recordReplay(wrapper.resolvePath, underlying)(
|
||||
(path) => callAndRecord(underlying.resolvePath(path), recordLog.pathsResolved, { path: path }),
|
||||
memoize((path) => findResultByFields(replayLog.pathsResolved, { path: path }, !ts.isRootedDiskPath(ts.normalizeSlashes(path)) && replayLog.currentDirectory ? replayLog.currentDirectory + "/" + path : ts.normalizeSlashes(path))));
|
||||
|
||||
wrapper.readFile = recordReplay(wrapper.readFile, underlying)(
|
||||
(path) => {
|
||||
let result = underlying.readFile(path);
|
||||
let logEntry = { path: path, codepage: 0, result: { contents: result, codepage: 0 } };
|
||||
recordLog.filesRead.push(logEntry);
|
||||
return result;
|
||||
},
|
||||
memoize((path) => findResultByPath(wrapper, replayLog.filesRead, path).contents));
|
||||
|
||||
wrapper.writeFile = recordReplay(wrapper.writeFile, underlying)(
|
||||
(path, contents) => callAndRecord(underlying.writeFile(path, contents), recordLog.filesWritten, { path: path, contents: contents, bom: false }),
|
||||
(path, contents) => noOpReplay("writeFile"));
|
||||
|
||||
wrapper.exit = (exitCode) => {
|
||||
if (recordLog !== undefined) {
|
||||
wrapper.endRecord();
|
||||
}
|
||||
underlying.exit(exitCode);
|
||||
};
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
export function wrapSystem(underlying: ts.System): PlaybackSystem {
|
||||
let wrapper: PlaybackSystem = <any>{};
|
||||
initWrapper(wrapper, underlying);
|
||||
return wrapper;
|
||||
}
|
||||
}
|
||||
@ -19,6 +19,11 @@ module RWC {
|
||||
}
|
||||
}
|
||||
|
||||
function isTsConfigFile(file: { path: string }): boolean {
|
||||
const tsConfigFileName = "tsconfig.json";
|
||||
return file.path.substr(file.path.length - tsConfigFileName.length).toLowerCase() === tsConfigFileName;
|
||||
}
|
||||
|
||||
export function runRWCTest(jsonPath: string) {
|
||||
describe("Testing a RWC project: " + jsonPath, () => {
|
||||
let inputFiles: { unitName: string; content: string; }[] = [];
|
||||
@ -67,10 +72,21 @@ module RWC {
|
||||
runWithIOLog(ioLog, oldIO => {
|
||||
harnessCompiler.reset();
|
||||
|
||||
let fileNames = opts.fileNames;
|
||||
|
||||
let tsconfigFile = ts.forEach(ioLog.filesRead, f => isTsConfigFile(f) ? f : undefined);
|
||||
if (tsconfigFile) {
|
||||
let tsconfigFileContents = getHarnessCompilerInputUnit(tsconfigFile.path);
|
||||
let parsedTsconfigFileContents = ts.parseConfigFileText(tsconfigFile.path, tsconfigFileContents.content);
|
||||
let configParseResult = ts.parseConfigFile(parsedTsconfigFileContents.config, Harness.IO, ts.getDirectoryPath(tsconfigFile.path));
|
||||
fileNames = configParseResult.fileNames;
|
||||
opts.options = ts.extend(opts.options, configParseResult.options);
|
||||
}
|
||||
|
||||
// Load the files
|
||||
ts.forEach(opts.fileNames, fileName => {
|
||||
for (let fileName of fileNames) {
|
||||
inputFiles.push(getHarnessCompilerInputUnit(fileName));
|
||||
});
|
||||
}
|
||||
|
||||
// Add files to compilation
|
||||
let isInInputList = (resolvedPath: string) => (inputFile: { unitName: string; content: string; }) => inputFile.unitName === resolvedPath;
|
||||
@ -79,6 +95,10 @@ module RWC {
|
||||
const resolvedPath = ts.normalizeSlashes(Harness.IO.resolvePath(fileRead.path));
|
||||
let inInputList = ts.forEach(inputFiles, isInInputList(resolvedPath));
|
||||
|
||||
if (isTsConfigFile(fileRead)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!Harness.isLibraryFile(fileRead.path)) {
|
||||
if (inInputList) {
|
||||
continue;
|
||||
|
||||
29
src/lib/es6.d.ts
vendored
29
src/lib/es6.d.ts
vendored
@ -125,7 +125,34 @@ interface ObjectConstructor {
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param sources One or more source objects to copy properties from.
|
||||
* @param source The source object from which to copy properties.
|
||||
*/
|
||||
assign<T, U>(target: T, source: U): T & U;
|
||||
|
||||
/**
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param source1 The first source object from which to copy properties.
|
||||
* @param source2 The second source object from which to copy properties.
|
||||
*/
|
||||
assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
|
||||
|
||||
/**
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param source1 The first source object from which to copy properties.
|
||||
* @param source2 The second source object from which to copy properties.
|
||||
* @param source3 The third source object from which to copy properties.
|
||||
*/
|
||||
assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
|
||||
|
||||
/**
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param sources One or more source objects from which to copy properties
|
||||
*/
|
||||
assign(target: any, ...sources: any[]): any;
|
||||
|
||||
|
||||
4
src/lib/intl.d.ts
vendored
4
src/lib/intl.d.ts
vendored
@ -41,7 +41,7 @@ declare module Intl {
|
||||
currency?: string;
|
||||
currencyDisplay?: string;
|
||||
useGrouping?: boolean;
|
||||
minimumintegerDigits?: number;
|
||||
minimumIntegerDigits?: number;
|
||||
minimumFractionDigits?: number;
|
||||
maximumFractionDigits?: number;
|
||||
minimumSignificantDigits?: number;
|
||||
@ -54,7 +54,7 @@ declare module Intl {
|
||||
style: string;
|
||||
currency?: string;
|
||||
currencyDisplay?: string;
|
||||
minimumintegerDigits: number;
|
||||
minimumIntegerDigits: number;
|
||||
minimumFractionDigits: number;
|
||||
maximumFractionDigits: number;
|
||||
minimumSignificantDigits?: number;
|
||||
|
||||
@ -2152,6 +2152,7 @@ namespace ts {
|
||||
//
|
||||
// export * from "mod"
|
||||
// export {a as b} from "mod"
|
||||
// export import i = require("mod")
|
||||
|
||||
while (token !== SyntaxKind.EndOfFileToken) {
|
||||
if (token === SyntaxKind.DeclareKeyword) {
|
||||
@ -2276,6 +2277,25 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (token === SyntaxKind.ImportKeyword) {
|
||||
token = scanner.scan();
|
||||
if (token === SyntaxKind.Identifier || isKeyword(token)) {
|
||||
token = scanner.scan();
|
||||
if (token === SyntaxKind.EqualsToken) {
|
||||
token = scanner.scan();
|
||||
if (token === SyntaxKind.RequireKeyword) {
|
||||
token = scanner.scan();
|
||||
if (token === SyntaxKind.OpenParenToken) {
|
||||
token = scanner.scan();
|
||||
if (token === SyntaxKind.StringLiteral) {
|
||||
// export import i = require("mod");
|
||||
recordModuleName();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
token = scanner.scan();
|
||||
}
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(2,15): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(6,18): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(17,22): error TS2371: A parameter initializer is only allowed in a function or constructor implementation.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(20,24): error TS1184: An implementation cannot be declared in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(20,24): error TS1183: An implementation cannot be declared in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(24,5): error TS1066: Ambient enum elements can only have integer literal initializers.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(29,5): error TS1066: Ambient enum elements can only have integer literal initializers.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(34,11): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(35,19): error TS1184: An implementation cannot be declared in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(35,19): error TS1183: An implementation cannot be declared in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(37,20): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(38,13): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(39,23): error TS1184: An implementation cannot be declared in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(40,14): error TS1184: An implementation cannot be declared in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(41,22): error TS1184: An implementation cannot be declared in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(39,23): error TS1183: An implementation cannot be declared in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(40,14): error TS1183: An implementation cannot be declared in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(41,22): error TS1183: An implementation cannot be declared in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(47,20): error TS2435: Ambient modules cannot be nested in other modules.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(51,16): error TS2436: Ambient module declaration cannot specify relative module name.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export assignment cannot be used in a module with other exported elements.
|
||||
@ -44,7 +44,7 @@ tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export
|
||||
// Ambient function with function body
|
||||
declare function fn4() { };
|
||||
~
|
||||
!!! error TS1184: An implementation cannot be declared in ambient contexts.
|
||||
!!! error TS1183: An implementation cannot be declared in ambient contexts.
|
||||
|
||||
// Ambient enum with non - integer literal constant member
|
||||
declare enum E1 {
|
||||
@ -67,7 +67,7 @@ tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export
|
||||
!!! error TS1039: Initializers are not allowed in ambient contexts.
|
||||
function fn() { }
|
||||
~
|
||||
!!! error TS1184: An implementation cannot be declared in ambient contexts.
|
||||
!!! error TS1183: An implementation cannot be declared in ambient contexts.
|
||||
class C {
|
||||
static x = 3;
|
||||
~
|
||||
@ -77,13 +77,13 @@ tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export
|
||||
!!! error TS1039: Initializers are not allowed in ambient contexts.
|
||||
constructor() { }
|
||||
~
|
||||
!!! error TS1184: An implementation cannot be declared in ambient contexts.
|
||||
!!! error TS1183: An implementation cannot be declared in ambient contexts.
|
||||
fn() { }
|
||||
~
|
||||
!!! error TS1184: An implementation cannot be declared in ambient contexts.
|
||||
!!! error TS1183: An implementation cannot be declared in ambient contexts.
|
||||
static sfn() { }
|
||||
~
|
||||
!!! error TS1184: An implementation cannot be declared in ambient contexts.
|
||||
!!! error TS1183: An implementation cannot be declared in ambient contexts.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -72,14 +72,14 @@ var temp2: [number[], string[]] = [[1, 2, 3], ["hello", "string"]];
|
||||
|
||||
interface myArray extends Array<Number> { }
|
||||
>myArray : Symbol(myArray, Decl(arrayLiterals2ES6.ts, 40, 67))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11))
|
||||
|
||||
interface myArray2 extends Array<Number|String> { }
|
||||
>myArray2 : Symbol(myArray2, Decl(arrayLiterals2ES6.ts, 42, 43))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1))
|
||||
|
||||
var d0 = [1, true, ...temp, ]; // has type (string|number|boolean)[]
|
||||
>d0 : Symbol(d0, Decl(arrayLiterals2ES6.ts, 44, 3))
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
|
||||
var foo = async (): Promise<void> => {
|
||||
>foo : Symbol(foo, Decl(asyncArrowFunction1_es6.ts, 1, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
};
|
||||
|
||||
@ -2,16 +2,16 @@
|
||||
type MyPromise<T> = Promise<T>;
|
||||
>MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11))
|
||||
>T : Symbol(T, Decl(asyncAwait_es6.ts, 0, 15))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>T : Symbol(T, Decl(asyncAwait_es6.ts, 0, 15))
|
||||
|
||||
declare var MyPromise: typeof Promise;
|
||||
>MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
declare var p: Promise<number>;
|
||||
>p : Symbol(p, Decl(asyncAwait_es6.ts, 2, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
declare var mp: MyPromise<number>;
|
||||
>mp : Symbol(mp, Decl(asyncAwait_es6.ts, 3, 11))
|
||||
@ -22,7 +22,7 @@ async function f0() { }
|
||||
|
||||
async function f1(): Promise<void> { }
|
||||
>f1 : Symbol(f1, Decl(asyncAwait_es6.ts, 5, 23))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
async function f3(): MyPromise<void> { }
|
||||
>f3 : Symbol(f3, Decl(asyncAwait_es6.ts, 6, 38))
|
||||
@ -33,7 +33,7 @@ let f4 = async function() { }
|
||||
|
||||
let f5 = async function(): Promise<void> { }
|
||||
>f5 : Symbol(f5, Decl(asyncAwait_es6.ts, 10, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
let f6 = async function(): MyPromise<void> { }
|
||||
>f6 : Symbol(f6, Decl(asyncAwait_es6.ts, 11, 3))
|
||||
@ -44,7 +44,7 @@ let f7 = async () => { };
|
||||
|
||||
let f8 = async (): Promise<void> => { };
|
||||
>f8 : Symbol(f8, Decl(asyncAwait_es6.ts, 14, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
let f9 = async (): MyPromise<void> => { };
|
||||
>f9 : Symbol(f9, Decl(asyncAwait_es6.ts, 15, 3))
|
||||
@ -60,7 +60,7 @@ let f11 = async () => mp;
|
||||
|
||||
let f12 = async (): Promise<number> => mp;
|
||||
>f12 : Symbol(f12, Decl(asyncAwait_es6.ts, 18, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>mp : Symbol(mp, Decl(asyncAwait_es6.ts, 3, 11))
|
||||
|
||||
let f13 = async (): MyPromise<number> => p;
|
||||
@ -76,7 +76,7 @@ let o = {
|
||||
|
||||
async m2(): Promise<void> { },
|
||||
>m2 : Symbol(m2, Decl(asyncAwait_es6.ts, 22, 16))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
async m3(): MyPromise<void> { }
|
||||
>m3 : Symbol(m3, Decl(asyncAwait_es6.ts, 23, 31))
|
||||
@ -92,7 +92,7 @@ class C {
|
||||
|
||||
async m2(): Promise<void> { }
|
||||
>m2 : Symbol(m2, Decl(asyncAwait_es6.ts, 28, 15))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
async m3(): MyPromise<void> { }
|
||||
>m3 : Symbol(m3, Decl(asyncAwait_es6.ts, 29, 30))
|
||||
@ -103,7 +103,7 @@ class C {
|
||||
|
||||
static async m5(): Promise<void> { }
|
||||
>m5 : Symbol(C.m5, Decl(asyncAwait_es6.ts, 31, 22))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
static async m6(): MyPromise<void> { }
|
||||
>m6 : Symbol(C.m6, Decl(asyncAwait_es6.ts, 32, 37))
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts ===
|
||||
async function await(): Promise<void> {
|
||||
>await : Symbol(await, Decl(asyncFunctionDeclaration11_es6.ts, 0, 0))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts ===
|
||||
async function foo(): Promise<void> {
|
||||
>foo : Symbol(foo, Decl(asyncFunctionDeclaration14_es6.ts, 0, 0))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts ===
|
||||
async function foo(): Promise<void> {
|
||||
>foo : Symbol(foo, Decl(asyncFunctionDeclaration1_es6.ts, 0, 0))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
}
|
||||
|
||||
@ -4,11 +4,11 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitBinaryExpression1_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitBinaryExpression1_es6.ts, 1, 32))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
"before";
|
||||
var b = await p || a;
|
||||
|
||||
@ -4,11 +4,11 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitBinaryExpression2_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitBinaryExpression2_es6.ts, 1, 32))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
"before";
|
||||
var b = await p && a;
|
||||
|
||||
@ -4,11 +4,11 @@ declare var a: number;
|
||||
|
||||
declare var p: Promise<number>;
|
||||
>p : Symbol(p, Decl(awaitBinaryExpression3_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitBinaryExpression3_es6.ts, 1, 31))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
"before";
|
||||
var b = await p + a;
|
||||
|
||||
@ -4,11 +4,11 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitBinaryExpression4_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitBinaryExpression4_es6.ts, 1, 32))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
"before";
|
||||
var b = await p, a;
|
||||
|
||||
@ -4,11 +4,11 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitBinaryExpression5_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitBinaryExpression5_es6.ts, 1, 32))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
"before";
|
||||
var o: { a: boolean; };
|
||||
|
||||
@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression1_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 1, 32))
|
||||
@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression1_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression1_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression1_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 5, 43))
|
||||
@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression1_es6.ts, 5, 84))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
"before";
|
||||
var b = fn(a, a, a);
|
||||
|
||||
@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression2_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 1, 32))
|
||||
@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression2_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression2_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression2_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 5, 43))
|
||||
@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression2_es6.ts, 5, 84))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
"before";
|
||||
var b = fn(await p, a, a);
|
||||
|
||||
@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression3_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 1, 32))
|
||||
@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression3_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression3_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression3_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 5, 43))
|
||||
@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression3_es6.ts, 5, 84))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
"before";
|
||||
var b = fn(a, await p, a);
|
||||
|
||||
@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression4_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression4_es6.ts, 1, 32))
|
||||
@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression4_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression4_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression4_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression4_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 5, 43))
|
||||
@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression4_es6.ts, 5, 84))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
"before";
|
||||
var b = (await pfn)(a, a, a);
|
||||
|
||||
@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression5_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 1, 32))
|
||||
@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression5_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression5_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression5_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 5, 43))
|
||||
@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression5_es6.ts, 5, 84))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
"before";
|
||||
var b = o.fn(a, a, a);
|
||||
|
||||
@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression6_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 1, 32))
|
||||
@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression6_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression6_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression6_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 5, 43))
|
||||
@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression6_es6.ts, 5, 84))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
"before";
|
||||
var b = o.fn(await p, a, a);
|
||||
|
||||
@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression7_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 1, 32))
|
||||
@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression7_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression7_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression7_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 5, 43))
|
||||
@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression7_es6.ts, 5, 84))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
"before";
|
||||
var b = o.fn(a, await p, a);
|
||||
|
||||
@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression8_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 1, 32))
|
||||
@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression8_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression8_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression8_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 5, 43))
|
||||
@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression8_es6.ts, 5, 84))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11))
|
||||
|
||||
"before";
|
||||
var b = (await po).fn(a, a, a);
|
||||
|
||||
@ -94,7 +94,7 @@ xa[1].foo(1, 2, ...a, "abc");
|
||||
>a : Symbol(a, Decl(callWithSpreadES6.ts, 8, 3))
|
||||
|
||||
(<Function>xa[1].foo)(...[1, 2, "abc"]);
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11), Decl(lib.d.ts, 4009, 1))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11), Decl(lib.d.ts, 4036, 1))
|
||||
>xa[1].foo : Symbol(X.foo, Decl(callWithSpreadES6.ts, 1, 13))
|
||||
>xa : Symbol(xa, Decl(callWithSpreadES6.ts, 11, 3))
|
||||
>foo : Symbol(X.foo, Decl(callWithSpreadES6.ts, 1, 13))
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractDeclarations.d.ts(2,5): error TS1242: 'abstract' modifier can only appear on a class or method declaration.
|
||||
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractDeclarations.d.ts(2,28): error TS1184: An implementation cannot be declared in ambient contexts.
|
||||
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractDeclarations.d.ts(2,28): error TS1183: An implementation cannot be declared in ambient contexts.
|
||||
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractDeclarations.d.ts(11,15): error TS2515: Non-abstract class 'CC' does not implement inherited abstract member 'foo' from class 'AA'.
|
||||
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractDeclarations.d.ts(13,15): error TS2515: Non-abstract class 'DD' does not implement inherited abstract member 'foo' from class 'BB'.
|
||||
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractDeclarations.d.ts(17,15): error TS2515: Non-abstract class 'FF' does not implement inherited abstract member 'foo' from class 'CC'.
|
||||
@ -11,7 +11,7 @@ tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbst
|
||||
~~~~~~~~
|
||||
!!! error TS1242: 'abstract' modifier can only appear on a class or method declaration.
|
||||
~
|
||||
!!! error TS1184: An implementation cannot be declared in ambient contexts.
|
||||
!!! error TS1183: An implementation cannot be declared in ambient contexts.
|
||||
}
|
||||
|
||||
declare abstract class AA {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/constructorOverloads6.ts(4,25): error TS1184: An implementation cannot be declared in ambient contexts.
|
||||
tests/cases/compiler/constructorOverloads6.ts(4,25): error TS1183: An implementation cannot be declared in ambient contexts.
|
||||
|
||||
|
||||
==== tests/cases/compiler/constructorOverloads6.ts (1 errors) ====
|
||||
@ -7,7 +7,7 @@ tests/cases/compiler/constructorOverloads6.ts(4,25): error TS1184: An implementa
|
||||
constructor(n: number);
|
||||
constructor(x: any) {
|
||||
~
|
||||
!!! error TS1184: An implementation cannot be declared in ambient contexts.
|
||||
!!! error TS1183: An implementation cannot be declared in ambient contexts.
|
||||
|
||||
}
|
||||
bar1():void;
|
||||
|
||||
@ -0,0 +1,67 @@
|
||||
tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration01.ts(17,24): error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration01.ts(20,24): error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration01.ts(28,27): error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration01.ts(31,27): error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration01.ts(39,36): error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration01.ts(42,36): error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration01.ts (6 errors) ====
|
||||
|
||||
interface A {
|
||||
numProp: number;
|
||||
}
|
||||
|
||||
interface B {
|
||||
strProp: string;
|
||||
}
|
||||
|
||||
interface Foo {
|
||||
method1(arg: A): void;
|
||||
method2(arg: B): void;
|
||||
}
|
||||
|
||||
function getFoo1(): Foo {
|
||||
return class {
|
||||
static method1(arg) {
|
||||
~~~
|
||||
!!! error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
arg.numProp = 10;
|
||||
}
|
||||
static method2(arg) {
|
||||
~~~
|
||||
!!! error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getFoo2(): Foo {
|
||||
return class {
|
||||
static method1 = (arg) => {
|
||||
~~~
|
||||
!!! error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
arg.numProp = 10;
|
||||
}
|
||||
static method2 = (arg) => {
|
||||
~~~
|
||||
!!! error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getFoo3(): Foo {
|
||||
return class {
|
||||
static method1 = function (arg) {
|
||||
~~~
|
||||
!!! error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
arg.numProp = 10;
|
||||
}
|
||||
static method2 = function (arg) {
|
||||
~~~
|
||||
!!! error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
//// [contextuallyTypedClassExpressionMethodDeclaration01.ts]
|
||||
|
||||
interface A {
|
||||
numProp: number;
|
||||
}
|
||||
|
||||
interface B {
|
||||
strProp: string;
|
||||
}
|
||||
|
||||
interface Foo {
|
||||
method1(arg: A): void;
|
||||
method2(arg: B): void;
|
||||
}
|
||||
|
||||
function getFoo1(): Foo {
|
||||
return class {
|
||||
static method1(arg) {
|
||||
arg.numProp = 10;
|
||||
}
|
||||
static method2(arg) {
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getFoo2(): Foo {
|
||||
return class {
|
||||
static method1 = (arg) => {
|
||||
arg.numProp = 10;
|
||||
}
|
||||
static method2 = (arg) => {
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getFoo3(): Foo {
|
||||
return class {
|
||||
static method1 = function (arg) {
|
||||
arg.numProp = 10;
|
||||
}
|
||||
static method2 = function (arg) {
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//// [contextuallyTypedClassExpressionMethodDeclaration01.js]
|
||||
function getFoo1() {
|
||||
return (function () {
|
||||
function class_1() {
|
||||
}
|
||||
class_1.method1 = function (arg) {
|
||||
arg.numProp = 10;
|
||||
};
|
||||
class_1.method2 = function (arg) {
|
||||
arg.strProp = "hello";
|
||||
};
|
||||
return class_1;
|
||||
})();
|
||||
}
|
||||
function getFoo2() {
|
||||
return (function () {
|
||||
function class_2() {
|
||||
}
|
||||
class_2.method1 = function (arg) {
|
||||
arg.numProp = 10;
|
||||
};
|
||||
class_2.method2 = function (arg) {
|
||||
arg.strProp = "hello";
|
||||
};
|
||||
return class_2;
|
||||
})();
|
||||
}
|
||||
function getFoo3() {
|
||||
return (function () {
|
||||
function class_3() {
|
||||
}
|
||||
class_3.method1 = function (arg) {
|
||||
arg.numProp = 10;
|
||||
};
|
||||
class_3.method2 = function (arg) {
|
||||
arg.strProp = "hello";
|
||||
};
|
||||
return class_3;
|
||||
})();
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration02.ts(21,17): error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration02.ts(24,17): error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration02.ts(32,20): error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration02.ts(35,20): error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration02.ts(43,29): error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration02.ts(46,29): error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration02.ts (6 errors) ====
|
||||
|
||||
interface A {
|
||||
numProp: number;
|
||||
}
|
||||
|
||||
interface B {
|
||||
strProp: string;
|
||||
}
|
||||
|
||||
interface Foo {
|
||||
new (): Bar;
|
||||
}
|
||||
|
||||
interface Bar {
|
||||
method1(arg: A): void;
|
||||
method2(arg: B): void;
|
||||
}
|
||||
|
||||
function getFoo1(): Foo {
|
||||
return class {
|
||||
method1(arg) {
|
||||
~~~
|
||||
!!! error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
arg.numProp = 10;
|
||||
}
|
||||
method2(arg) {
|
||||
~~~
|
||||
!!! error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getFoo2(): Foo {
|
||||
return class {
|
||||
method1 = (arg) => {
|
||||
~~~
|
||||
!!! error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
arg.numProp = 10;
|
||||
}
|
||||
method2 = (arg) => {
|
||||
~~~
|
||||
!!! error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getFoo3(): Foo {
|
||||
return class {
|
||||
method1 = function (arg) {
|
||||
~~~
|
||||
!!! error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
arg.numProp = 10;
|
||||
}
|
||||
method2 = function (arg) {
|
||||
~~~
|
||||
!!! error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,92 @@
|
||||
//// [contextuallyTypedClassExpressionMethodDeclaration02.ts]
|
||||
|
||||
interface A {
|
||||
numProp: number;
|
||||
}
|
||||
|
||||
interface B {
|
||||
strProp: string;
|
||||
}
|
||||
|
||||
interface Foo {
|
||||
new (): Bar;
|
||||
}
|
||||
|
||||
interface Bar {
|
||||
method1(arg: A): void;
|
||||
method2(arg: B): void;
|
||||
}
|
||||
|
||||
function getFoo1(): Foo {
|
||||
return class {
|
||||
method1(arg) {
|
||||
arg.numProp = 10;
|
||||
}
|
||||
method2(arg) {
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getFoo2(): Foo {
|
||||
return class {
|
||||
method1 = (arg) => {
|
||||
arg.numProp = 10;
|
||||
}
|
||||
method2 = (arg) => {
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getFoo3(): Foo {
|
||||
return class {
|
||||
method1 = function (arg) {
|
||||
arg.numProp = 10;
|
||||
}
|
||||
method2 = function (arg) {
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//// [contextuallyTypedClassExpressionMethodDeclaration02.js]
|
||||
function getFoo1() {
|
||||
return (function () {
|
||||
function class_1() {
|
||||
}
|
||||
class_1.prototype.method1 = function (arg) {
|
||||
arg.numProp = 10;
|
||||
};
|
||||
class_1.prototype.method2 = function (arg) {
|
||||
arg.strProp = "hello";
|
||||
};
|
||||
return class_1;
|
||||
})();
|
||||
}
|
||||
function getFoo2() {
|
||||
return (function () {
|
||||
function class_2() {
|
||||
this.method1 = function (arg) {
|
||||
arg.numProp = 10;
|
||||
};
|
||||
this.method2 = function (arg) {
|
||||
arg.strProp = "hello";
|
||||
};
|
||||
}
|
||||
return class_2;
|
||||
})();
|
||||
}
|
||||
function getFoo3() {
|
||||
return (function () {
|
||||
function class_3() {
|
||||
this.method1 = function (arg) {
|
||||
arg.numProp = 10;
|
||||
};
|
||||
this.method2 = function (arg) {
|
||||
arg.strProp = "hello";
|
||||
};
|
||||
}
|
||||
return class_3;
|
||||
})();
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
//// [contextuallyTypedObjectLiteralMethodDeclaration01.ts]
|
||||
|
||||
interface A {
|
||||
numProp: number;
|
||||
}
|
||||
|
||||
interface B {
|
||||
strProp: string;
|
||||
}
|
||||
|
||||
interface Foo {
|
||||
method1(arg: A): void;
|
||||
method2(arg: B): void;
|
||||
}
|
||||
|
||||
function getFoo1(): Foo {
|
||||
return {
|
||||
method1(arg) {
|
||||
arg.numProp = 10;
|
||||
},
|
||||
method2(arg) {
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getFoo2(): Foo {
|
||||
return {
|
||||
method1: (arg) => {
|
||||
arg.numProp = 10;
|
||||
},
|
||||
method2: (arg) => {
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getFoo3(): Foo {
|
||||
return {
|
||||
method1: function (arg) {
|
||||
arg.numProp = 10;
|
||||
},
|
||||
method2: function (arg) {
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//// [contextuallyTypedObjectLiteralMethodDeclaration01.js]
|
||||
function getFoo1() {
|
||||
return {
|
||||
method1: function (arg) {
|
||||
arg.numProp = 10;
|
||||
},
|
||||
method2: function (arg) {
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
};
|
||||
}
|
||||
function getFoo2() {
|
||||
return {
|
||||
method1: function (arg) {
|
||||
arg.numProp = 10;
|
||||
},
|
||||
method2: function (arg) {
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
};
|
||||
}
|
||||
function getFoo3() {
|
||||
return {
|
||||
method1: function (arg) {
|
||||
arg.numProp = 10;
|
||||
},
|
||||
method2: function (arg) {
|
||||
arg.strProp = "hello";
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,110 @@
|
||||
=== tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedObjectLiteralMethodDeclaration01.ts ===
|
||||
|
||||
interface A {
|
||||
>A : Symbol(A, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 0, 0))
|
||||
|
||||
numProp: number;
|
||||
>numProp : Symbol(numProp, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 1, 13))
|
||||
}
|
||||
|
||||
interface B {
|
||||
>B : Symbol(B, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 3, 1))
|
||||
|
||||
strProp: string;
|
||||
>strProp : Symbol(strProp, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 5, 14))
|
||||
}
|
||||
|
||||
interface Foo {
|
||||
>Foo : Symbol(Foo, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 7, 1))
|
||||
|
||||
method1(arg: A): void;
|
||||
>method1 : Symbol(method1, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 9, 15))
|
||||
>arg : Symbol(arg, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 10, 12))
|
||||
>A : Symbol(A, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 0, 0))
|
||||
|
||||
method2(arg: B): void;
|
||||
>method2 : Symbol(method2, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 10, 26))
|
||||
>arg : Symbol(arg, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 11, 12))
|
||||
>B : Symbol(B, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 3, 1))
|
||||
}
|
||||
|
||||
function getFoo1(): Foo {
|
||||
>getFoo1 : Symbol(getFoo1, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 12, 1))
|
||||
>Foo : Symbol(Foo, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 7, 1))
|
||||
|
||||
return {
|
||||
method1(arg) {
|
||||
>method1 : Symbol(method1, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 15, 12))
|
||||
>arg : Symbol(arg, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 16, 16))
|
||||
|
||||
arg.numProp = 10;
|
||||
>arg.numProp : Symbol(A.numProp, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 1, 13))
|
||||
>arg : Symbol(arg, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 16, 16))
|
||||
>numProp : Symbol(A.numProp, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 1, 13))
|
||||
|
||||
},
|
||||
method2(arg) {
|
||||
>method2 : Symbol(method2, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 18, 10))
|
||||
>arg : Symbol(arg, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 19, 16))
|
||||
|
||||
arg.strProp = "hello";
|
||||
>arg.strProp : Symbol(B.strProp, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 5, 14))
|
||||
>arg : Symbol(arg, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 19, 16))
|
||||
>strProp : Symbol(B.strProp, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 5, 14))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getFoo2(): Foo {
|
||||
>getFoo2 : Symbol(getFoo2, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 23, 1))
|
||||
>Foo : Symbol(Foo, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 7, 1))
|
||||
|
||||
return {
|
||||
method1: (arg) => {
|
||||
>method1 : Symbol(method1, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 26, 12))
|
||||
>arg : Symbol(arg, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 27, 18))
|
||||
|
||||
arg.numProp = 10;
|
||||
>arg.numProp : Symbol(A.numProp, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 1, 13))
|
||||
>arg : Symbol(arg, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 27, 18))
|
||||
>numProp : Symbol(A.numProp, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 1, 13))
|
||||
|
||||
},
|
||||
method2: (arg) => {
|
||||
>method2 : Symbol(method2, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 29, 10))
|
||||
>arg : Symbol(arg, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 30, 18))
|
||||
|
||||
arg.strProp = "hello";
|
||||
>arg.strProp : Symbol(B.strProp, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 5, 14))
|
||||
>arg : Symbol(arg, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 30, 18))
|
||||
>strProp : Symbol(B.strProp, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 5, 14))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getFoo3(): Foo {
|
||||
>getFoo3 : Symbol(getFoo3, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 34, 1))
|
||||
>Foo : Symbol(Foo, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 7, 1))
|
||||
|
||||
return {
|
||||
method1: function (arg) {
|
||||
>method1 : Symbol(method1, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 37, 12))
|
||||
>arg : Symbol(arg, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 38, 27))
|
||||
|
||||
arg.numProp = 10;
|
||||
>arg.numProp : Symbol(A.numProp, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 1, 13))
|
||||
>arg : Symbol(arg, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 38, 27))
|
||||
>numProp : Symbol(A.numProp, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 1, 13))
|
||||
|
||||
},
|
||||
method2: function (arg) {
|
||||
>method2 : Symbol(method2, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 40, 10))
|
||||
>arg : Symbol(arg, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 41, 27))
|
||||
|
||||
arg.strProp = "hello";
|
||||
>arg.strProp : Symbol(B.strProp, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 5, 14))
|
||||
>arg : Symbol(arg, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 41, 27))
|
||||
>strProp : Symbol(B.strProp, Decl(contextuallyTypedObjectLiteralMethodDeclaration01.ts, 5, 14))
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,132 @@
|
||||
=== tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedObjectLiteralMethodDeclaration01.ts ===
|
||||
|
||||
interface A {
|
||||
>A : A
|
||||
|
||||
numProp: number;
|
||||
>numProp : number
|
||||
}
|
||||
|
||||
interface B {
|
||||
>B : B
|
||||
|
||||
strProp: string;
|
||||
>strProp : string
|
||||
}
|
||||
|
||||
interface Foo {
|
||||
>Foo : Foo
|
||||
|
||||
method1(arg: A): void;
|
||||
>method1 : (arg: A) => void
|
||||
>arg : A
|
||||
>A : A
|
||||
|
||||
method2(arg: B): void;
|
||||
>method2 : (arg: B) => void
|
||||
>arg : B
|
||||
>B : B
|
||||
}
|
||||
|
||||
function getFoo1(): Foo {
|
||||
>getFoo1 : () => Foo
|
||||
>Foo : Foo
|
||||
|
||||
return {
|
||||
>{ method1(arg) { arg.numProp = 10; }, method2(arg) { arg.strProp = "hello"; } } : { method1(arg: A): void; method2(arg: B): void; }
|
||||
|
||||
method1(arg) {
|
||||
>method1 : (arg: A) => void
|
||||
>arg : A
|
||||
|
||||
arg.numProp = 10;
|
||||
>arg.numProp = 10 : number
|
||||
>arg.numProp : number
|
||||
>arg : A
|
||||
>numProp : number
|
||||
>10 : number
|
||||
|
||||
},
|
||||
method2(arg) {
|
||||
>method2 : (arg: B) => void
|
||||
>arg : B
|
||||
|
||||
arg.strProp = "hello";
|
||||
>arg.strProp = "hello" : string
|
||||
>arg.strProp : string
|
||||
>arg : B
|
||||
>strProp : string
|
||||
>"hello" : string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getFoo2(): Foo {
|
||||
>getFoo2 : () => Foo
|
||||
>Foo : Foo
|
||||
|
||||
return {
|
||||
>{ method1: (arg) => { arg.numProp = 10; }, method2: (arg) => { arg.strProp = "hello"; } } : { method1: (arg: A) => void; method2: (arg: B) => void; }
|
||||
|
||||
method1: (arg) => {
|
||||
>method1 : (arg: A) => void
|
||||
>(arg) => { arg.numProp = 10; } : (arg: A) => void
|
||||
>arg : A
|
||||
|
||||
arg.numProp = 10;
|
||||
>arg.numProp = 10 : number
|
||||
>arg.numProp : number
|
||||
>arg : A
|
||||
>numProp : number
|
||||
>10 : number
|
||||
|
||||
},
|
||||
method2: (arg) => {
|
||||
>method2 : (arg: B) => void
|
||||
>(arg) => { arg.strProp = "hello"; } : (arg: B) => void
|
||||
>arg : B
|
||||
|
||||
arg.strProp = "hello";
|
||||
>arg.strProp = "hello" : string
|
||||
>arg.strProp : string
|
||||
>arg : B
|
||||
>strProp : string
|
||||
>"hello" : string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getFoo3(): Foo {
|
||||
>getFoo3 : () => Foo
|
||||
>Foo : Foo
|
||||
|
||||
return {
|
||||
>{ method1: function (arg) { arg.numProp = 10; }, method2: function (arg) { arg.strProp = "hello"; } } : { method1: (arg: A) => void; method2: (arg: B) => void; }
|
||||
|
||||
method1: function (arg) {
|
||||
>method1 : (arg: A) => void
|
||||
>function (arg) { arg.numProp = 10; } : (arg: A) => void
|
||||
>arg : A
|
||||
|
||||
arg.numProp = 10;
|
||||
>arg.numProp = 10 : number
|
||||
>arg.numProp : number
|
||||
>arg : A
|
||||
>numProp : number
|
||||
>10 : number
|
||||
|
||||
},
|
||||
method2: function (arg) {
|
||||
>method2 : (arg: B) => void
|
||||
>function (arg) { arg.strProp = "hello"; } : (arg: B) => void
|
||||
>arg : B
|
||||
|
||||
arg.strProp = "hello";
|
||||
>arg.strProp = "hello" : string
|
||||
>arg.strProp : string
|
||||
>arg : B
|
||||
>strProp : string
|
||||
>"hello" : string
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -8,18 +8,18 @@
|
||||
|
||||
type arrayString = Array<String>
|
||||
>arrayString : Symbol(arrayString, Decl(destructuringParameterDeclaration3ES5.ts, 0, 0))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1))
|
||||
|
||||
type someArray = Array<String> | number[];
|
||||
>someArray : Symbol(someArray, Decl(destructuringParameterDeclaration3ES5.ts, 7, 32))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1))
|
||||
|
||||
type stringOrNumArray = Array<String|Number>;
|
||||
>stringOrNumArray : Symbol(stringOrNumArray, Decl(destructuringParameterDeclaration3ES5.ts, 8, 42))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11))
|
||||
|
||||
function a1(...x: (number|string)[]) { }
|
||||
@ -33,8 +33,8 @@ function a2(...a) { }
|
||||
function a3(...a: Array<String>) { }
|
||||
>a3 : Symbol(a3, Decl(destructuringParameterDeclaration3ES5.ts, 12, 21))
|
||||
>a : Symbol(a, Decl(destructuringParameterDeclaration3ES5.ts, 13, 12))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1))
|
||||
|
||||
function a4(...a: arrayString) { }
|
||||
>a4 : Symbol(a4, Decl(destructuringParameterDeclaration3ES5.ts, 13, 36))
|
||||
|
||||
@ -8,18 +8,18 @@
|
||||
|
||||
type arrayString = Array<String>
|
||||
>arrayString : Symbol(arrayString, Decl(destructuringParameterDeclaration3ES6.ts, 0, 0))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1))
|
||||
|
||||
type someArray = Array<String> | number[];
|
||||
>someArray : Symbol(someArray, Decl(destructuringParameterDeclaration3ES6.ts, 7, 32))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1))
|
||||
|
||||
type stringOrNumArray = Array<String|Number>;
|
||||
>stringOrNumArray : Symbol(stringOrNumArray, Decl(destructuringParameterDeclaration3ES6.ts, 8, 42))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11))
|
||||
|
||||
function a1(...x: (number|string)[]) { }
|
||||
@ -33,8 +33,8 @@ function a2(...a) { }
|
||||
function a3(...a: Array<String>) { }
|
||||
>a3 : Symbol(a3, Decl(destructuringParameterDeclaration3ES6.ts, 12, 21))
|
||||
>a : Symbol(a, Decl(destructuringParameterDeclaration3ES6.ts, 13, 12))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1))
|
||||
|
||||
function a4(...a: arrayString) { }
|
||||
>a4 : Symbol(a4, Decl(destructuringParameterDeclaration3ES6.ts, 13, 36))
|
||||
|
||||
@ -5,7 +5,7 @@ function f() {
|
||||
|
||||
if (Math.random()) {
|
||||
>Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4392, 60))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4419, 60))
|
||||
>random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
|
||||
let arguments = 100;
|
||||
|
||||
@ -8,7 +8,7 @@ function f() {
|
||||
|
||||
if (Math.random()) {
|
||||
>Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4392, 60))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4419, 60))
|
||||
>random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
|
||||
const arguments = 100;
|
||||
|
||||
@ -8,7 +8,7 @@ function f() {
|
||||
|
||||
if (Math.random()) {
|
||||
>Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4392, 60))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4419, 60))
|
||||
>random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
|
||||
return () => arguments[0];
|
||||
|
||||
@ -9,7 +9,7 @@ function f() {
|
||||
|
||||
if (Math.random()) {
|
||||
>Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4392, 60))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4419, 60))
|
||||
>random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
|
||||
return () => arguments[0];
|
||||
|
||||
@ -10,7 +10,7 @@ function f() {
|
||||
|
||||
if (Math.random()) {
|
||||
>Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4392, 60))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4419, 60))
|
||||
>random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
|
||||
return () => arguments;
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
//// [emptyArrayBindingPatternParameter01.ts]
|
||||
|
||||
|
||||
function f([]) {
|
||||
var x, y, z;
|
||||
}
|
||||
@ -9,3 +8,7 @@ function f([]) {
|
||||
function f(_a) {
|
||||
var x, y, z;
|
||||
}
|
||||
|
||||
|
||||
//// [emptyArrayBindingPatternParameter01.d.ts]
|
||||
declare function f([]: any[]): void;
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
=== tests/cases/conformance/es6/destructuring/emptyArrayBindingPatternParameter01.ts ===
|
||||
|
||||
|
||||
function f([]) {
|
||||
>f : Symbol(f, Decl(emptyArrayBindingPatternParameter01.ts, 0, 0))
|
||||
|
||||
var x, y, z;
|
||||
>x : Symbol(x, Decl(emptyArrayBindingPatternParameter01.ts, 3, 7))
|
||||
>y : Symbol(y, Decl(emptyArrayBindingPatternParameter01.ts, 3, 10))
|
||||
>z : Symbol(z, Decl(emptyArrayBindingPatternParameter01.ts, 3, 13))
|
||||
>x : Symbol(x, Decl(emptyArrayBindingPatternParameter01.ts, 2, 7))
|
||||
>y : Symbol(y, Decl(emptyArrayBindingPatternParameter01.ts, 2, 10))
|
||||
>z : Symbol(z, Decl(emptyArrayBindingPatternParameter01.ts, 2, 13))
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
=== tests/cases/conformance/es6/destructuring/emptyArrayBindingPatternParameter01.ts ===
|
||||
|
||||
|
||||
function f([]) {
|
||||
>f : ([]: any[]) => void
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
//// [emptyArrayBindingPatternParameter02.ts]
|
||||
|
||||
|
||||
function f(a, []) {
|
||||
var x, y, z;
|
||||
}
|
||||
@ -9,3 +8,7 @@ function f(a, []) {
|
||||
function f(a, _a) {
|
||||
var x, y, z;
|
||||
}
|
||||
|
||||
|
||||
//// [emptyArrayBindingPatternParameter02.d.ts]
|
||||
declare function f(a: any, []: any[]): void;
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
=== tests/cases/conformance/es6/destructuring/emptyArrayBindingPatternParameter02.ts ===
|
||||
|
||||
|
||||
function f(a, []) {
|
||||
>f : Symbol(f, Decl(emptyArrayBindingPatternParameter02.ts, 0, 0))
|
||||
>a : Symbol(a, Decl(emptyArrayBindingPatternParameter02.ts, 2, 11))
|
||||
>a : Symbol(a, Decl(emptyArrayBindingPatternParameter02.ts, 1, 11))
|
||||
|
||||
var x, y, z;
|
||||
>x : Symbol(x, Decl(emptyArrayBindingPatternParameter02.ts, 3, 7))
|
||||
>y : Symbol(y, Decl(emptyArrayBindingPatternParameter02.ts, 3, 10))
|
||||
>z : Symbol(z, Decl(emptyArrayBindingPatternParameter02.ts, 3, 13))
|
||||
>x : Symbol(x, Decl(emptyArrayBindingPatternParameter02.ts, 2, 7))
|
||||
>y : Symbol(y, Decl(emptyArrayBindingPatternParameter02.ts, 2, 10))
|
||||
>z : Symbol(z, Decl(emptyArrayBindingPatternParameter02.ts, 2, 13))
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
=== tests/cases/conformance/es6/destructuring/emptyArrayBindingPatternParameter02.ts ===
|
||||
|
||||
|
||||
function f(a, []) {
|
||||
>f : (a: any, []: any[]) => void
|
||||
>a : any
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
//// [emptyArrayBindingPatternParameter03.ts]
|
||||
|
||||
|
||||
function f(a, []) {
|
||||
var x, y, z;
|
||||
}
|
||||
@ -9,3 +8,7 @@ function f(a, []) {
|
||||
function f(a, _a) {
|
||||
var x, y, z;
|
||||
}
|
||||
|
||||
|
||||
//// [emptyArrayBindingPatternParameter03.d.ts]
|
||||
declare function f(a: any, []: any[]): void;
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
=== tests/cases/conformance/es6/destructuring/emptyArrayBindingPatternParameter03.ts ===
|
||||
|
||||
|
||||
function f(a, []) {
|
||||
>f : Symbol(f, Decl(emptyArrayBindingPatternParameter03.ts, 0, 0))
|
||||
>a : Symbol(a, Decl(emptyArrayBindingPatternParameter03.ts, 2, 11))
|
||||
>a : Symbol(a, Decl(emptyArrayBindingPatternParameter03.ts, 1, 11))
|
||||
|
||||
var x, y, z;
|
||||
>x : Symbol(x, Decl(emptyArrayBindingPatternParameter03.ts, 3, 7))
|
||||
>y : Symbol(y, Decl(emptyArrayBindingPatternParameter03.ts, 3, 10))
|
||||
>z : Symbol(z, Decl(emptyArrayBindingPatternParameter03.ts, 3, 13))
|
||||
>x : Symbol(x, Decl(emptyArrayBindingPatternParameter03.ts, 2, 7))
|
||||
>y : Symbol(y, Decl(emptyArrayBindingPatternParameter03.ts, 2, 10))
|
||||
>z : Symbol(z, Decl(emptyArrayBindingPatternParameter03.ts, 2, 13))
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
=== tests/cases/conformance/es6/destructuring/emptyArrayBindingPatternParameter03.ts ===
|
||||
|
||||
|
||||
function f(a, []) {
|
||||
>f : (a: any, []: any[]) => void
|
||||
>a : any
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
//// [emptyArrayBindingPatternParameter04.ts]
|
||||
|
||||
|
||||
function f([] = [1,2,3,4]) {
|
||||
var x, y, z;
|
||||
}
|
||||
@ -10,3 +9,7 @@ function f(_a) {
|
||||
var _a = [1, 2, 3, 4];
|
||||
var x, y, z;
|
||||
}
|
||||
|
||||
|
||||
//// [emptyArrayBindingPatternParameter04.d.ts]
|
||||
declare function f([]?: number[]): void;
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
=== tests/cases/conformance/es6/destructuring/emptyArrayBindingPatternParameter04.ts ===
|
||||
|
||||
|
||||
function f([] = [1,2,3,4]) {
|
||||
>f : Symbol(f, Decl(emptyArrayBindingPatternParameter04.ts, 0, 0))
|
||||
|
||||
var x, y, z;
|
||||
>x : Symbol(x, Decl(emptyArrayBindingPatternParameter04.ts, 3, 7))
|
||||
>y : Symbol(y, Decl(emptyArrayBindingPatternParameter04.ts, 3, 10))
|
||||
>z : Symbol(z, Decl(emptyArrayBindingPatternParameter04.ts, 3, 13))
|
||||
>x : Symbol(x, Decl(emptyArrayBindingPatternParameter04.ts, 2, 7))
|
||||
>y : Symbol(y, Decl(emptyArrayBindingPatternParameter04.ts, 2, 10))
|
||||
>z : Symbol(z, Decl(emptyArrayBindingPatternParameter04.ts, 2, 13))
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
=== tests/cases/conformance/es6/destructuring/emptyArrayBindingPatternParameter04.ts ===
|
||||
|
||||
|
||||
function f([] = [1,2,3,4]) {
|
||||
>f : ([]?: number[]) => void
|
||||
>[1,2,3,4] : number[]
|
||||
|
||||
@ -9,3 +9,7 @@ var a: any;
|
||||
var a;
|
||||
(a);
|
||||
(a);
|
||||
|
||||
|
||||
//// [emptyAssignmentPatterns01_ES5.d.ts]
|
||||
declare var a: any;
|
||||
|
||||
@ -9,3 +9,7 @@ var a: any;
|
||||
var a;
|
||||
({} = a);
|
||||
([] = a);
|
||||
|
||||
|
||||
//// [emptyAssignmentPatterns01_ES6.d.ts]
|
||||
declare var a: any;
|
||||
|
||||
@ -11,3 +11,8 @@ var a;
|
||||
var x, y, z, a1, a2, a3;
|
||||
((x = a.x, y = a.y, z = a.z, a));
|
||||
((a1 = a[0], a2 = a[1], a3 = a[2], a));
|
||||
|
||||
|
||||
//// [emptyAssignmentPatterns02_ES5.d.ts]
|
||||
declare var a: any;
|
||||
declare let x: any, y: any, z: any, a1: any, a2: any, a3: any;
|
||||
|
||||
@ -11,3 +11,8 @@ var a;
|
||||
let x, y, z, a1, a2, a3;
|
||||
({} = { x, y, z } = a);
|
||||
([] = [a1, a2, a3] = a);
|
||||
|
||||
|
||||
//// [emptyAssignmentPatterns02_ES6.d.ts]
|
||||
declare var a: any;
|
||||
declare let x: any, y: any, z: any, a1: any, a2: any, a3: any;
|
||||
|
||||
@ -9,3 +9,7 @@ var a: any;
|
||||
var a;
|
||||
(a);
|
||||
(a);
|
||||
|
||||
|
||||
//// [emptyAssignmentPatterns03_ES5.d.ts]
|
||||
declare var a: any;
|
||||
|
||||
@ -9,3 +9,7 @@ var a: any;
|
||||
var a;
|
||||
({} = {} = a);
|
||||
([] = [] = a);
|
||||
|
||||
|
||||
//// [emptyAssignmentPatterns03_ES6.d.ts]
|
||||
declare var a: any;
|
||||
|
||||
@ -12,3 +12,8 @@ var x, y, z, a1, a2, a3;
|
||||
(_a = a, x = _a.x, y = _a.y, z = _a.z, _a);
|
||||
(_b = a, a1 = _b[0], a2 = _b[1], a3 = _b[2], _b);
|
||||
var _a, _b;
|
||||
|
||||
|
||||
//// [emptyAssignmentPatterns04_ES5.d.ts]
|
||||
declare var a: any;
|
||||
declare let x: any, y: any, z: any, a1: any, a2: any, a3: any;
|
||||
|
||||
@ -11,3 +11,8 @@ var a;
|
||||
let x, y, z, a1, a2, a3;
|
||||
({ x, y, z } = {} = a);
|
||||
([a1, a2, a3] = [] = a);
|
||||
|
||||
|
||||
//// [emptyAssignmentPatterns04_ES6.d.ts]
|
||||
declare var a: any;
|
||||
declare let x: any, y: any, z: any, a1: any, a2: any, a3: any;
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
//// [emptyObjectBindingPatternParameter01.ts]
|
||||
|
||||
|
||||
function f({}) {
|
||||
var x, y, z;
|
||||
}
|
||||
@ -9,3 +8,7 @@ function f({}) {
|
||||
function f(_a) {
|
||||
var x, y, z;
|
||||
}
|
||||
|
||||
|
||||
//// [emptyObjectBindingPatternParameter01.d.ts]
|
||||
declare function f({}: {}): void;
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
=== tests/cases/conformance/es6/destructuring/emptyObjectBindingPatternParameter01.ts ===
|
||||
|
||||
|
||||
function f({}) {
|
||||
>f : Symbol(f, Decl(emptyObjectBindingPatternParameter01.ts, 0, 0))
|
||||
|
||||
var x, y, z;
|
||||
>x : Symbol(x, Decl(emptyObjectBindingPatternParameter01.ts, 3, 7))
|
||||
>y : Symbol(y, Decl(emptyObjectBindingPatternParameter01.ts, 3, 10))
|
||||
>z : Symbol(z, Decl(emptyObjectBindingPatternParameter01.ts, 3, 13))
|
||||
>x : Symbol(x, Decl(emptyObjectBindingPatternParameter01.ts, 2, 7))
|
||||
>y : Symbol(y, Decl(emptyObjectBindingPatternParameter01.ts, 2, 10))
|
||||
>z : Symbol(z, Decl(emptyObjectBindingPatternParameter01.ts, 2, 13))
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
=== tests/cases/conformance/es6/destructuring/emptyObjectBindingPatternParameter01.ts ===
|
||||
|
||||
|
||||
function f({}) {
|
||||
>f : ({}: {}) => void
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user