Merge branch 'master' into this-function-types

This commit is contained in:
Nathan Shively-Sanders
2016-03-28 10:12:25 -07:00
1427 changed files with 15853 additions and 8373 deletions
+4 -1
View File
@@ -150,7 +150,10 @@ var harnessSources = harnessCoreSources.concat([
"reuseProgramStructure.ts",
"cachingInServerLSHost.ts",
"moduleResolution.ts",
"tsconfigParsing.ts"
"tsconfigParsing.ts",
"commandLineParsing.ts",
"convertCompilerOptionsFromJson.ts",
"convertTypingOptionsFromJson.ts"
].map(function (f) {
return path.join(unittestsDirectory, f);
})).concat([
+5 -2
View File
@@ -76,8 +76,11 @@ module Commands {
fs.mkdirSync(directoryPath);
}
}
function normalizeSlashes(path: string): string {
return path.replace(/\\/g, "/");
}
function transalatePath(outputFolder:string, path: string): string {
return outputFolder + directorySeparator + path.replace(":", "");
return normalizeSlashes(outputFolder + directorySeparator + path.replace(":", ""));
}
function fileExists(path: string): boolean {
return fs.existsSync(path);
@@ -86,7 +89,7 @@ module Commands {
var filename = transalatePath(outputFolder, f.path);
ensureDirectoriesExist(getDirectoryPath(filename));
console.log("writing filename: " + filename);
fs.writeFile(filename, f.result.contents, (err) => { });
fs.writeFileSync(filename, f.result.contents);
});
console.log("Command: tsc ");
+31 -1
View File
@@ -279,6 +279,7 @@ namespace ts {
Debug.assert(!hasDynamicName(node));
const isDefaultExport = node.flags & NodeFlags.Default;
// The exported symbol for an export default function/class node is always named "default"
const name = isDefaultExport && parent ? "default" : getDeclarationName(node);
@@ -1355,6 +1356,8 @@ namespace ts {
case SyntaxKind.ImportSpecifier:
case SyntaxKind.ExportSpecifier:
return declareSymbolAndAddToSymbolTable(<Declaration>node, SymbolFlags.Alias, SymbolFlags.AliasExcludes);
case SyntaxKind.GlobalModuleExportDeclaration:
return bindGlobalModuleExportDeclaration(<GlobalModuleExportDeclaration>node);
case SyntaxKind.ImportClause:
return bindImportClause(<ImportClause>node);
case SyntaxKind.ExportDeclaration:
@@ -1404,6 +1407,33 @@ namespace ts {
}
}
function bindGlobalModuleExportDeclaration(node: GlobalModuleExportDeclaration) {
if (node.modifiers && node.modifiers.length) {
file.bindDiagnostics.push(createDiagnosticForNode(node, Diagnostics.Modifiers_cannot_appear_here));
}
if (node.parent.kind !== SyntaxKind.SourceFile) {
file.bindDiagnostics.push(createDiagnosticForNode(node, Diagnostics.Global_module_exports_may_only_appear_at_top_level));
return;
}
else {
const parent = node.parent as SourceFile;
if (!isExternalModule(parent)) {
file.bindDiagnostics.push(createDiagnosticForNode(node, Diagnostics.Global_module_exports_may_only_appear_in_module_files));
return;
}
if (!parent.isDeclarationFile) {
file.bindDiagnostics.push(createDiagnosticForNode(node, Diagnostics.Global_module_exports_may_only_appear_in_declaration_files));
return;
}
}
file.symbol.globalExports = file.symbol.globalExports || {};
declareSymbol(file.symbol.globalExports, file.symbol, node, SymbolFlags.Alias, SymbolFlags.AliasExcludes);
}
function bindExportDeclaration(node: ExportDeclaration) {
if (!container.symbol || !container.symbol.exports) {
// Export * in some sort of block construct
@@ -1438,7 +1468,7 @@ namespace ts {
function bindModuleExportsAssignment(node: BinaryExpression) {
// 'module.exports = expr' assignment
setCommonJsModuleIndicator(node);
bindExportAssignment(node);
declareSymbol(file.symbol.exports, file.symbol, node, SymbolFlags.Property | SymbolFlags.Export | SymbolFlags.ValueModule, SymbolFlags.None);
}
function bindThisPropertyAssignment(node: BinaryExpression) {
+799 -330
View File
File diff suppressed because it is too large Load Diff
+156 -118
View File
@@ -58,12 +58,11 @@ namespace ts {
},
paramType: Diagnostics.KIND,
description: Diagnostics.Specify_JSX_code_generation_Colon_preserve_or_react,
error: Diagnostics.Argument_for_jsx_must_be_preserve_or_react
},
{
name: "reactNamespace",
type: "string",
description: Diagnostics.Specifies_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit
description: Diagnostics.Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit
},
{
name: "listFiles",
@@ -77,7 +76,7 @@ namespace ts {
name: "mapRoot",
type: "string",
isFilePath: true,
description: Diagnostics.Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
description: Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
paramType: Diagnostics.LOCATION,
},
{
@@ -94,7 +93,6 @@ namespace ts {
},
description: Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015,
paramType: Diagnostics.KIND,
error: Diagnostics.Argument_for_module_option_must_be_commonjs_amd_system_umd_es2015_or_none
},
{
name: "newLine",
@@ -102,9 +100,8 @@ namespace ts {
"crlf": NewLineKind.CarriageReturnLineFeed,
"lf": NewLineKind.LineFeed
},
description: Diagnostics.Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
description: Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
paramType: Diagnostics.NEWLINE,
error: Diagnostics.Argument_for_newLine_option_must_be_CRLF_or_LF
},
{
name: "noEmit",
@@ -190,8 +187,8 @@ namespace ts {
name: "rootDir",
type: "string",
isFilePath: true,
description: Diagnostics.Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,
paramType: Diagnostics.LOCATION,
description: Diagnostics.Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,
},
{
name: "isolatedModules",
@@ -206,7 +203,7 @@ namespace ts {
name: "sourceRoot",
type: "string",
isFilePath: true,
description: Diagnostics.Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
description: Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
paramType: Diagnostics.LOCATION,
},
{
@@ -235,9 +232,8 @@ namespace ts {
"es6": ScriptTarget.ES6,
"es2015": ScriptTarget.ES2015,
},
description: Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015_experimental,
description: Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015,
paramType: Diagnostics.VERSION,
error: Diagnostics.Argument_for_target_option_must_be_ES3_ES5_or_ES2015
},
{
name: "version",
@@ -268,8 +264,7 @@ namespace ts {
"node": ModuleResolutionKind.NodeJs,
"classic": ModuleResolutionKind.Classic,
},
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,
description: Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6,
},
{
name: "allowUnusedLabels",
@@ -313,9 +308,13 @@ namespace ts {
// this option can only be specified in tsconfig.json
// use type = object to copy the value as-is
name: "rootDirs",
type: "object",
type: "list",
isTSConfigOnly: true,
isFilePath: true
element: {
name: "rootDirs",
type: "string",
isFilePath: true
}
},
{
name: "traceModuleResolution",
@@ -336,6 +335,35 @@ namespace ts {
name: "noImplicitUseStrict",
type: "boolean",
description: Diagnostics.Do_not_emit_use_strict_directives_in_module_output
},
{
name: "strictNullChecks",
type: "boolean",
description: Diagnostics.Enable_strict_null_checks
}
];
/* @internal */
export let typingOptionDeclarations: CommandLineOption[] = [
{
name: "enableAutoDiscovery",
type: "boolean",
},
{
name: "include",
type: "list",
element: {
name: "include",
type: "string"
}
},
{
name: "exclude",
type: "list",
element: {
name: "exclude",
type: "string"
}
}
];
@@ -365,6 +393,16 @@ namespace ts {
return optionNameMapCache;
}
/* @internal */
export function createCompilerDiagnosticForInvalidCustomType(opt: CommandLineOptionOfCustomType): Diagnostic {
const namesOfType: string[] = [];
forEachKey(opt.type, key => {
namesOfType.push(` '${key}'`);
});
return createCompilerDiagnostic(Diagnostics.Argument_for_0_option_must_be_Colon_1, `--${opt.name}`, namesOfType);
}
export function parseCommandLine(commandLine: string[], readFile?: (path: string) => string): ParsedCommandLine {
const options: CompilerOptions = {};
const fileNames: string[] = [];
@@ -418,17 +456,15 @@ namespace ts {
options[opt.name] = args[i] || "";
i++;
break;
case "list":
options[opt.name] = parseListTypeOption(<CommandLineOptionOfListType>opt, args[i]);
i++;
break;
// If not a primitive, the possible types are specified in what is effectively a map of options.
default:
let map = <Map<number>>opt.type;
let key = (args[i] || "").toLowerCase();
options[opt.name] = parseCustomTypeOption(<CommandLineOptionOfCustomType>opt, args[i]);
i++;
if (hasProperty(map, key)) {
options[opt.name] = map[key];
}
else {
errors.push(createCompilerDiagnostic((<CommandLineOptionOfCustomType>opt).error));
}
break;
}
}
}
@@ -439,6 +475,29 @@ namespace ts {
else {
fileNames.push(s);
}
function parseCustomTypeOption(opt: CommandLineOptionOfCustomType, value: string) {
const key = (value || "").trim().toLowerCase();
const map = opt.type;
if (hasProperty(map, key)) {
return map[key];
}
else {
errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
}
}
function parseListTypeOption(opt: CommandLineOptionOfListType, value: string): (string | number)[] {
const values = (value || "").trim().split(",");
switch (opt.element.type) {
case "number":
return ts.map(values, parseInt);
case "string":
return ts.map(values, v => v || "");
default:
return filter(map(values, v => parseCustomTypeOption(<CommandLineOptionOfCustomType>opt.element, v)), v => !!v);
}
}
}
}
@@ -506,7 +565,6 @@ namespace ts {
}
}
/**
* Remove the comments from a json like text.
* Comments can be single line comments (starting with # or //) or multiline comments using / * * /
@@ -540,21 +598,24 @@ namespace ts {
* file to. e.g. outDir
*/
export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions: CompilerOptions = {}, configFileName?: string): ParsedCommandLine {
const { options: optionsFromJsonConfigFile, errors } = convertCompilerOptionsFromJson(json["compilerOptions"], basePath, configFileName);
const errors: Diagnostic[] = [];
const compilerOptions: CompilerOptions = convertCompilerOptionsFromJsonWorker(json["compilerOptions"], basePath, errors, configFileName);
const options = extend(existingOptions, compilerOptions);
const typingOptions: TypingOptions = convertTypingOptionsFromJsonWorker(json["typingOptions"], basePath, errors, configFileName);
const options = extend(existingOptions, optionsFromJsonConfigFile);
const fileNames = getFileNames(errors);
return {
options,
fileNames: getFileNames(),
typingOptions: getTypingOptions(),
fileNames,
typingOptions,
errors
};
function getFileNames(): string[] {
function getFileNames(errors: Diagnostic[]): string[] {
let fileNames: string[] = [];
if (hasProperty(json, "files")) {
if (json["files"] instanceof Array) {
if (isArray(json["files"])) {
fileNames = map(<string[]>json["files"], s => combinePaths(basePath, s));
}
else {
@@ -565,7 +626,7 @@ namespace ts {
const filesSeen: Map<boolean> = {};
let exclude: string[] = [];
if (json["exclude"] instanceof Array) {
if (isArray(json["exclude"])) {
exclude = json["exclude"];
}
else {
@@ -612,47 +673,43 @@ namespace ts {
}
return fileNames;
}
function getTypingOptions(): TypingOptions {
const options: TypingOptions = getBaseFileName(configFileName) === "jsconfig.json"
? { enableAutoDiscovery: true, include: [], exclude: [] }
: { enableAutoDiscovery: false, include: [], exclude: [] };
const jsonTypingOptions = json["typingOptions"];
if (jsonTypingOptions) {
for (const id in jsonTypingOptions) {
if (id === "enableAutoDiscovery") {
if (typeof jsonTypingOptions[id] === "boolean") {
options.enableAutoDiscovery = jsonTypingOptions[id];
}
else {
errors.push(createCompilerDiagnostic(Diagnostics.Unknown_typing_option_0, id));
}
}
else if (id === "include") {
options.include = convertJsonOptionToStringArray(id, jsonTypingOptions[id], errors);
}
else if (id === "exclude") {
options.exclude = convertJsonOptionToStringArray(id, jsonTypingOptions[id], errors);
}
else {
errors.push(createCompilerDiagnostic(Diagnostics.Unknown_typing_option_0, id));
}
}
}
return options;
}
}
export function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): { options: CompilerOptions, errors: Diagnostic[] } {
const options: CompilerOptions = {};
const errors: Diagnostic[] = [];
const options = convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName);
return { options, errors };
}
if (configFileName && getBaseFileName(configFileName) === "jsconfig.json") {
options.allowJs = true;
}
export function convertTypingOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): { options: CompilerOptions, errors: Diagnostic[] } {
const errors: Diagnostic[] = [];
const options = convertTypingOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName);
return { options, errors };
}
function convertCompilerOptionsFromJsonWorker(jsonOptions: any,
basePath: string, errors: Diagnostic[], configFileName?: string): CompilerOptions {
const options: CompilerOptions = getBaseFileName(configFileName) === "jsconfig.json" ? { allowJs: true } : {};
convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, options, Diagnostics.Unknown_compiler_option_0, errors);
return options;
}
function convertTypingOptionsFromJsonWorker(jsonOptions: any,
basePath: string, errors: Diagnostic[], configFileName?: string): TypingOptions {
const options: TypingOptions = getBaseFileName(configFileName) === "jsconfig.json"
? { enableAutoDiscovery: true, include: [], exclude: [] }
: { enableAutoDiscovery: false, include: [], exclude: [] };
convertOptionsFromJson(typingOptionDeclarations, jsonOptions, basePath, options, Diagnostics.Unknown_typing_option_0, errors);
return options;
}
function convertOptionsFromJson(optionDeclarations: CommandLineOption[], jsonOptions: any, basePath: string,
defaultOptions: CompilerOptions | TypingOptions, diagnosticMessage: DiagnosticMessage, errors: Diagnostic[]) {
if (!jsonOptions) {
return { options, errors };
return ;
}
const optionNameMap = arrayToMap(optionDeclarations, opt => opt.name);
@@ -660,69 +717,50 @@ namespace ts {
for (const id in jsonOptions) {
if (hasProperty(optionNameMap, id)) {
const opt = optionNameMap[id];
const optType = opt.type;
let value = jsonOptions[id];
const expectedType = typeof optType === "string" ? optType : "string";
if (typeof value === expectedType) {
if (typeof optType !== "string") {
const key = value.toLowerCase();
if (hasProperty(optType, key)) {
value = optType[key];
}
else {
errors.push(createCompilerDiagnostic((<CommandLineOptionOfCustomType>opt).error));
value = 0;
}
}
if (opt.isFilePath) {
switch (typeof value) {
case "string":
value = normalizePath(combinePaths(basePath, value));
break;
case "object":
// "object" options with 'isFilePath' = true expected to be string arrays
value = convertJsonOptionToStringArray(opt.name, value, errors, (element) => normalizePath(combinePaths(basePath, element)));
break;
}
if (value === "") {
value = ".";
}
}
options[opt.name] = value;
}
else {
errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, id, expectedType));
}
defaultOptions[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors);
}
else {
errors.push(createCompilerDiagnostic(Diagnostics.Unknown_compiler_option_0, id));
errors.push(createCompilerDiagnostic(diagnosticMessage, id));
}
}
return { options, errors };
}
function convertJsonOptionToStringArray(optionName: string, optionJson: any, errors: Diagnostic[], func?: (element: string) => string): string[] {
const items: string[] = [];
let invalidOptionType = false;
if (!isArray(optionJson)) {
invalidOptionType = true;
function convertJsonOption(opt: CommandLineOption, value: any, basePath: string, errors: Diagnostic[]): CompilerOptionsValue {
const optType = opt.type;
const expectedType = typeof optType === "string" ? optType : "string";
if (optType === "list" && isArray(value)) {
return convertJsonOptionOfListType(<CommandLineOptionOfListType>opt, value, basePath, errors);
}
else if (typeof value === expectedType) {
if (typeof optType !== "string") {
return convertJsonOptionOfCustomType(<CommandLineOptionOfCustomType>opt, value, errors);
}
else {
if (opt.isFilePath) {
value = normalizePath(combinePaths(basePath, value));
if (value === "") {
value = ".";
}
}
}
return value;
}
else {
for (const element of <any[]>optionJson) {
if (typeof element === "string") {
const item = func ? func(element) : element;
items.push(item);
}
else {
invalidOptionType = true;
break;
}
}
errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, opt.name, expectedType));
}
if (invalidOptionType) {
errors.push(createCompilerDiagnostic(Diagnostics.Option_0_should_have_array_of_strings_as_a_value, optionName));
}
function convertJsonOptionOfCustomType(opt: CommandLineOptionOfCustomType, value: string, errors: Diagnostic[]) {
const key = value.toLowerCase();
if (hasProperty(opt.type, key)) {
return opt.type[key];
}
return items;
else {
errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
}
}
function convertJsonOptionOfListType(option: CommandLineOptionOfListType, values: any[], basePath: string, errors: Diagnostic[]): any[] {
return filter(map(values, v => convertJsonOption(option.element, v, basePath, errors)), v => !!v);
}
}
+16 -4
View File
@@ -242,8 +242,14 @@ namespace ts {
const count = array.length;
if (count > 0) {
let pos = 0;
let result = arguments.length <= 2 ? array[pos] : initial;
pos++;
let result: T | U;
if (arguments.length <= 2) {
result = array[pos];
pos++;
}
else {
result = initial;
}
while (pos < count) {
result = f(<U>result, array[pos]);
pos++;
@@ -260,8 +266,14 @@ namespace ts {
if (array) {
let pos = array.length - 1;
if (pos >= 0) {
let result = arguments.length <= 2 ? array[pos] : initial;
pos--;
let result: T | U;
if (arguments.length <= 2) {
result = array[pos];
pos--;
}
else {
result = initial;
}
while (pos >= 0) {
result = f(<U>result, array[pos]);
pos--;
+2
View File
@@ -367,6 +367,8 @@ namespace ts {
case SyntaxKind.BooleanKeyword:
case SyntaxKind.SymbolKeyword:
case SyntaxKind.VoidKeyword:
case SyntaxKind.UndefinedKeyword:
case SyntaxKind.NullKeyword:
case SyntaxKind.ThisType:
case SyntaxKind.StringLiteralType:
return writeTextOfNode(currentText, type);
+36 -24
View File
@@ -831,6 +831,18 @@
"category": "Error",
"code": 1313
},
"Global module exports may only appear in module files.": {
"category": "Error",
"code": 1314
},
"Global module exports may only appear in declaration files.": {
"category": "Error",
"code": 1315
},
"Global module exports may only appear at top level.": {
"category": "Error",
"code": 1316
},
"Duplicate identifier '{0}'.": {
"category": "Error",
"code": 2300
@@ -1091,6 +1103,10 @@
"category": "Error",
"code": 2365
},
"Function lacks ending return statement and return type does not include 'undefined'.": {
"category": "Error",
"code": 2366
},
"Type parameter name cannot be '{0}'": {
"category": "Error",
"code": 2368
@@ -1411,6 +1427,10 @@
"category": "Error",
"code": 2453
},
"Variable '{0}' is used before being assigned.": {
"category": "Error",
"code": 2454
},
"Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'.": {
"category": "Error",
"code": 2455
@@ -1707,6 +1727,10 @@
"category": "Error",
"code": 2530
},
"Object is possibly 'null' or 'undefined'.": {
"category": "Error",
"code": 2531
},
"JSX element attributes type '{0}' may not be a union type.": {
"category": "Error",
"code": 2600
@@ -2244,11 +2268,11 @@
"category": "Message",
"code": 6002
},
"Specifies the location where debugger should locate map files instead of generated locations.": {
"Specify the location where debugger should locate map files instead of generated locations.": {
"category": "Message",
"code": 6003
},
"Specifies the location where debugger should locate TypeScript files instead of source locations.": {
"Specify the location where debugger should locate TypeScript files instead of source locations.": {
"category": "Message",
"code": 6004
},
@@ -2280,7 +2304,7 @@
"category": "Message",
"code": 6011
},
"Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES2015' (experimental)": {
"Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES2015'": {
"category": "Message",
"code": 6015
},
@@ -2368,14 +2392,10 @@
"category": "Error",
"code": 6045
},
"Argument for '--module' option must be 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'none'.": {
"Argument for '{0}' option must be: {1}": {
"category": "Error",
"code": 6046
},
"Argument for '--target' option must be 'ES3', 'ES5', or 'ES2015'.": {
"category": "Error",
"code": 6047
},
"Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'.": {
"category": "Error",
"code": 6048
@@ -2412,7 +2432,7 @@
"category": "Message",
"code": 6056
},
"Specifies the root directory of input files. Use to control the output directory structure with --outDir.": {
"Specify the root directory of input files. Use to control the output directory structure with --outDir.": {
"category": "Message",
"code": 6058
},
@@ -2420,7 +2440,7 @@
"category": "Error",
"code": 6059
},
"Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix).": {
"Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix).": {
"category": "Message",
"code": 6060
},
@@ -2428,14 +2448,6 @@
"category": "Message",
"code": 6061
},
"Argument for '--newLine' option must be 'CRLF' or 'LF'.": {
"category": "Error",
"code": 6062
},
"Argument for '--moduleResolution' option must be 'node' or 'classic'.": {
"category": "Error",
"code": 6063
},
"Option '{0}' can only be specified in 'tsconfig.json' file.": {
"category": "Error",
"code": 6064
@@ -2452,7 +2464,7 @@
"category": "Message",
"code": 6068
},
"Specifies module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6).": {
"Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6).": {
"category": "Message",
"code": 6069
},
@@ -2496,10 +2508,6 @@
"category": "Message",
"code": 6080
},
"Argument for '--jsx' must be 'preserve' or 'react'.": {
"category": "Message",
"code": 6081
},
"Only 'amd' and 'system' modules are supported alongside --{0}.": {
"category": "Error",
"code": 6082
@@ -2508,7 +2516,7 @@
"category": "Message",
"code": 6083
},
"Specifies the object invoked for createElement and __spread when targeting 'react' JSX emit": {
"Specify the object invoked for createElement and __spread when targeting 'react' JSX emit": {
"category": "Message",
"code": 6084
},
@@ -2624,6 +2632,10 @@
"category": "Message",
"code": 6112
},
"Enable strict null checks.": {
"category": "Message",
"code": 6113
},
"Variable '{0}' implicitly has an '{1}' type.": {
"category": "Error",
+61 -25
View File
@@ -604,7 +604,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
write(`//# sourceMappingURL=${sourceMappingURL}`);
}
writeEmittedFiles(writer.getText(), jsFilePath, sourceMapFilePath, /*writeByteOrderMark*/ compilerOptions.emitBOM);
writeEmittedFiles(writer.getText(), jsFilePath, sourceMapFilePath, /*writeByteOrderMark*/ compilerOptions.emitBOM, sourceFiles);
// reset the state
sourceMap.reset();
@@ -748,16 +748,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
}
/** Write emitted output to disk */
function writeEmittedFiles(emitOutput: string, jsFilePath: string, sourceMapFilePath: string, writeByteOrderMark: boolean) {
function writeEmittedFiles(emitOutput: string, jsFilePath: string, sourceMapFilePath: string, writeByteOrderMark: boolean, sourceFiles: SourceFile[]) {
if (compilerOptions.sourceMap && !compilerOptions.inlineSourceMap) {
writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap.getText(), /*writeByteOrderMark*/ false);
writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap.getText(), /*writeByteOrderMark*/ false, sourceFiles);
}
if (sourceMapDataList) {
sourceMapDataList.push(sourceMap.getSourceMapData());
}
writeFile(host, emitterDiagnostics, jsFilePath, emitOutput, writeByteOrderMark);
writeFile(host, emitterDiagnostics, jsFilePath, emitOutput, writeByteOrderMark, sourceFiles);
}
// Create a temporary variable with a unique unused name.
@@ -1533,6 +1533,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
case SyntaxKind.JsxSpreadAttribute:
case SyntaxKind.JsxExpression:
case SyntaxKind.NewExpression:
case SyntaxKind.NonNullExpression:
case SyntaxKind.ParenthesizedExpression:
case SyntaxKind.PostfixUnaryExpression:
case SyntaxKind.PrefixUnaryExpression:
@@ -2077,8 +2078,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
function parenthesizeForAccess(expr: Expression): LeftHandSideExpression {
// When diagnosing whether the expression needs parentheses, the decision should be based
// on the innermost expression in a chain of nested type assertions.
while (expr.kind === SyntaxKind.TypeAssertionExpression || expr.kind === SyntaxKind.AsExpression) {
expr = (<AssertionExpression>expr).expression;
while (expr.kind === SyntaxKind.TypeAssertionExpression ||
expr.kind === SyntaxKind.AsExpression ||
expr.kind === SyntaxKind.NonNullExpression) {
expr = (<AssertionExpression | NonNullExpression>expr).expression;
}
// isLeftHandSideExpression is almost the correct criterion for when it is not necessary
@@ -2343,8 +2346,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
}
function skipParentheses(node: Expression): Expression {
while (node.kind === SyntaxKind.ParenthesizedExpression || node.kind === SyntaxKind.TypeAssertionExpression || node.kind === SyntaxKind.AsExpression) {
node = (<ParenthesizedExpression | AssertionExpression>node).expression;
while (node.kind === SyntaxKind.ParenthesizedExpression ||
node.kind === SyntaxKind.TypeAssertionExpression ||
node.kind === SyntaxKind.AsExpression ||
node.kind === SyntaxKind.NonNullExpression) {
node = (<ParenthesizedExpression | AssertionExpression | NonNullExpression>node).expression;
}
return node;
}
@@ -2518,13 +2524,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
// not the user. If we didn't want them, the emitter would not have put them
// there.
if (!nodeIsSynthesized(node) && node.parent.kind !== SyntaxKind.ArrowFunction) {
if (node.expression.kind === SyntaxKind.TypeAssertionExpression || node.expression.kind === SyntaxKind.AsExpression) {
let operand = (<TypeAssertion>node.expression).expression;
if (node.expression.kind === SyntaxKind.TypeAssertionExpression ||
node.expression.kind === SyntaxKind.AsExpression ||
node.expression.kind === SyntaxKind.NonNullExpression) {
let operand = (<TypeAssertion | NonNullExpression>node.expression).expression;
// Make sure we consider all nested cast expressions, e.g.:
// (<any><number><any>-A).x;
while (operand.kind === SyntaxKind.TypeAssertionExpression || operand.kind === SyntaxKind.AsExpression) {
operand = (<TypeAssertion>operand).expression;
while (operand.kind === SyntaxKind.TypeAssertionExpression ||
operand.kind === SyntaxKind.AsExpression ||
operand.kind === SyntaxKind.NonNullExpression) {
operand = (<TypeAssertion | NonNullExpression>operand).expression;
}
// We have an expression of the form: (<Type>SubExpr)
@@ -4218,12 +4228,31 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
function emitVariableDeclaration(node: VariableDeclaration) {
if (isBindingPattern(node.name)) {
if (languageVersion < ScriptTarget.ES6) {
emitDestructuring(node, /*isAssignmentExpressionStatement*/ false);
}
else {
const isExported = getCombinedNodeFlags(node) & NodeFlags.Export;
if (languageVersion >= ScriptTarget.ES6 && (!isExported || modulekind === ModuleKind.ES6)) {
// emit ES6 destructuring only if target module is ES6 or variable is not exported
// exported variables in CJS/AMD are prefixed with 'exports.' so result javascript { exports.toString } = 1; is illegal
const isTopLevelDeclarationInSystemModule =
modulekind === ModuleKind.System &&
shouldHoistVariable(node, /*checkIfSourceFileLevelDecl*/true);
if (isTopLevelDeclarationInSystemModule) {
// In System modules top level variables are hoisted
// so variable declarations with destructuring are turned into destructuring assignments.
// As a result, they will need parentheses to disambiguate object binding assignments from blocks.
write("(");
}
emit(node.name);
emitOptional(" = ", node.initializer);
if (isTopLevelDeclarationInSystemModule) {
write(")");
}
}
else {
emitDestructuring(node, /*isAssignmentExpressionStatement*/ false);
}
}
else {
@@ -5279,9 +5308,11 @@ const _super = (function (geti, seti) {
function emitClassLikeDeclarationForES6AndHigher(node: ClassLikeDeclaration) {
let decoratedClassAlias: string;
const thisNodeIsDecorated = nodeIsDecorated(node);
const isHoistedDeclarationInSystemModule = shouldHoistDeclarationInSystemJsModule(node);
const isDecorated = nodeIsDecorated(node);
const rewriteAsClassExpression = isDecorated || isHoistedDeclarationInSystemModule;
if (node.kind === SyntaxKind.ClassDeclaration) {
if (thisNodeIsDecorated) {
if (rewriteAsClassExpression) {
// When we emit an ES6 class that has a class decorator, we must tailor the
// emit to certain specific cases.
//
@@ -5362,7 +5393,10 @@ const _super = (function (geti, seti) {
// [Example 4]
//
if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.ClassWithBodyScopedClassBinding) {
// NOTE: we reuse the same rewriting logic for cases when targeting ES6 and module kind is System.
// Because of hoisting top level class declaration need to be emitted as class expressions.
// Double bind case is only required if node is decorated.
if (isDecorated && resolver.getNodeCheckFlags(node) & NodeCheckFlags.ClassWithBodyScopedClassBinding) {
decoratedClassAlias = unescapeIdentifier(makeUniqueName(node.name ? node.name.text : "default"));
decoratedClassAliases[getNodeId(node)] = decoratedClassAlias;
write(`let ${decoratedClassAlias};`);
@@ -5373,7 +5407,9 @@ const _super = (function (geti, seti) {
write("export ");
}
write("let ");
if (!isHoistedDeclarationInSystemModule) {
write("let ");
}
emitDeclarationName(node);
if (decoratedClassAlias !== undefined) {
write(` = ${decoratedClassAlias}`);
@@ -5417,7 +5453,7 @@ const _super = (function (geti, seti) {
// emit name if
// - node has a name
// - this is default export with static initializers
if (node.name || (node.flags & NodeFlags.Default && (staticProperties.length > 0 || modulekind !== ModuleKind.ES6) && !thisNodeIsDecorated)) {
if (node.name || (node.flags & NodeFlags.Default && (staticProperties.length > 0 || modulekind !== ModuleKind.ES6) && !rewriteAsClassExpression)) {
write(" ");
emitDeclarationName(node);
}
@@ -5437,7 +5473,7 @@ const _super = (function (geti, seti) {
writeLine();
emitToken(SyntaxKind.CloseBraceToken, node.members.end);
if (thisNodeIsDecorated) {
if (rewriteAsClassExpression) {
decoratedClassAliases[getNodeId(node)] = undefined;
write(";");
}
@@ -5477,7 +5513,7 @@ const _super = (function (geti, seti) {
// module), export it
if (node.flags & NodeFlags.Default) {
// if this is a top level default export of decorated class, write the export after the declaration.
if (thisNodeIsDecorated) {
if (isDecorated) {
writeLine();
write("export default ");
emitDeclarationName(node);
@@ -7903,9 +7939,9 @@ const _super = (function (geti, seti) {
case SyntaxKind.TaggedTemplateExpression:
return emitTaggedTemplateExpression(<TaggedTemplateExpression>node);
case SyntaxKind.TypeAssertionExpression:
return emit((<TypeAssertion>node).expression);
case SyntaxKind.AsExpression:
return emit((<AsExpression>node).expression);
case SyntaxKind.NonNullExpression:
return emit((<AssertionExpression | NonNullExpression>node).expression);
case SyntaxKind.ParenthesizedExpression:
return emitParenExpression(<ParenthesizedExpression>node);
case SyntaxKind.FunctionDeclaration:
+45 -6
View File
@@ -177,6 +177,8 @@ namespace ts {
case SyntaxKind.AsExpression:
return visitNode(cbNode, (<AsExpression>node).expression) ||
visitNode(cbNode, (<AsExpression>node).type);
case SyntaxKind.NonNullExpression:
return visitNode(cbNode, (<NonNullExpression>node).expression);
case SyntaxKind.ConditionalExpression:
return visitNode(cbNode, (<ConditionalExpression>node).condition) ||
visitNode(cbNode, (<ConditionalExpression>node).questionToken) ||
@@ -301,6 +303,9 @@ namespace ts {
case SyntaxKind.ImportClause:
return visitNode(cbNode, (<ImportClause>node).name) ||
visitNode(cbNode, (<ImportClause>node).namedBindings);
case SyntaxKind.GlobalModuleExportDeclaration:
return visitNode(cbNode, (<GlobalModuleExportDeclaration>node).name);
case SyntaxKind.NamespaceImport:
return visitNode(cbNode, (<NamespaceImport>node).name);
case SyntaxKind.NamedImports:
@@ -1125,7 +1130,7 @@ namespace ts {
if (token === SyntaxKind.DefaultKeyword) {
return lookAhead(nextTokenIsClassOrFunction);
}
return token !== SyntaxKind.AsteriskToken && token !== SyntaxKind.OpenBraceToken && canFollowModifier();
return token !== SyntaxKind.AsteriskToken && token !== SyntaxKind.AsKeyword && token !== SyntaxKind.OpenBraceToken && canFollowModifier();
}
if (token === SyntaxKind.DefaultKeyword) {
return nextTokenIsClassOrFunction();
@@ -2362,12 +2367,14 @@ namespace ts {
case SyntaxKind.NumberKeyword:
case SyntaxKind.BooleanKeyword:
case SyntaxKind.SymbolKeyword:
case SyntaxKind.UndefinedKeyword:
// If these are followed by a dot, then parse these out as a dotted type reference instead.
const node = tryParse(parseKeywordAndNoDot);
return node || parseTypeReference();
case SyntaxKind.StringLiteral:
return parseStringLiteralTypeNode();
case SyntaxKind.VoidKeyword:
case SyntaxKind.NullKeyword:
return parseTokenNode<TypeNode>();
case SyntaxKind.ThisKeyword: {
const thisKeyword = parseThisTypeNode();
@@ -2399,6 +2406,8 @@ namespace ts {
case SyntaxKind.BooleanKeyword:
case SyntaxKind.SymbolKeyword:
case SyntaxKind.VoidKeyword:
case SyntaxKind.UndefinedKeyword:
case SyntaxKind.NullKeyword:
case SyntaxKind.ThisKeyword:
case SyntaxKind.TypeOfKeyword:
case SyntaxKind.OpenBraceToken:
@@ -3725,6 +3734,14 @@ namespace ts {
continue;
}
if (token === SyntaxKind.ExclamationToken && !scanner.hasPrecedingLineBreak()) {
nextToken();
const nonNullExpression = <NonNullExpression>createNode(SyntaxKind.NonNullExpression, expression.pos);
nonNullExpression.expression = expression;
expression = finishNode(nonNullExpression);
continue;
}
// when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName
if (!inDecoratorContext() && parseOptional(SyntaxKind.OpenBracketToken)) {
const indexedAccess = <ElementAccessExpression>createNode(SyntaxKind.ElementAccessExpression, expression.pos);
@@ -4404,7 +4421,8 @@ namespace ts {
continue;
case SyntaxKind.GlobalKeyword:
return nextToken() === SyntaxKind.OpenBraceToken;
nextToken();
return token === SyntaxKind.OpenBraceToken || token === SyntaxKind.Identifier || token === SyntaxKind.ExportKeyword;
case SyntaxKind.ImportKeyword:
nextToken();
@@ -4413,7 +4431,8 @@ namespace ts {
case SyntaxKind.ExportKeyword:
nextToken();
if (token === SyntaxKind.EqualsToken || token === SyntaxKind.AsteriskToken ||
token === SyntaxKind.OpenBraceToken || token === SyntaxKind.DefaultKeyword) {
token === SyntaxKind.OpenBraceToken || token === SyntaxKind.DefaultKeyword ||
token === SyntaxKind.AsKeyword) {
return true;
}
continue;
@@ -4597,9 +4616,15 @@ namespace ts {
return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers);
case SyntaxKind.ExportKeyword:
nextToken();
return token === SyntaxKind.DefaultKeyword || token === SyntaxKind.EqualsToken ?
parseExportAssignment(fullStart, decorators, modifiers) :
parseExportDeclaration(fullStart, decorators, modifiers);
switch (token) {
case SyntaxKind.DefaultKeyword:
case SyntaxKind.EqualsToken:
return parseExportAssignment(fullStart, decorators, modifiers);
case SyntaxKind.AsKeyword:
return parseGlobalModuleExportDeclaration(fullStart, decorators, modifiers);
default:
return parseExportDeclaration(fullStart, decorators, modifiers);
}
default:
if (decorators || modifiers) {
// We reached this point because we encountered decorators and/or modifiers and assumed a declaration
@@ -5268,6 +5293,20 @@ namespace ts {
return nextToken() === SyntaxKind.SlashToken;
}
function parseGlobalModuleExportDeclaration(fullStart: number, decorators: NodeArray<Decorator>, modifiers: ModifiersArray): GlobalModuleExportDeclaration {
const exportDeclaration = <GlobalModuleExportDeclaration>createNode(SyntaxKind.GlobalModuleExportDeclaration, fullStart);
exportDeclaration.decorators = decorators;
exportDeclaration.modifiers = modifiers;
parseExpected(SyntaxKind.AsKeyword);
parseExpected(SyntaxKind.NamespaceKeyword);
exportDeclaration.name = parseIdentifier();
parseExpected(SyntaxKind.SemicolonToken);
return finishNode(exportDeclaration);
}
function parseImportDeclarationOrImportEqualsDeclaration(fullStart: number, decorators: NodeArray<Decorator>, modifiers: ModifiersArray): ImportEqualsDeclaration | ImportDeclaration {
parseExpected(SyntaxKind.ImportKeyword);
const afterImportPos = scanner.getStartPos();
+18 -27
View File
@@ -931,7 +931,7 @@ namespace ts {
getSourceFile: program.getSourceFile,
getSourceFiles: program.getSourceFiles,
writeFile: writeFileCallback || (
(fileName, data, writeByteOrderMark, onError) => host.writeFile(fileName, data, writeByteOrderMark, onError)),
(fileName, data, writeByteOrderMark, onError, sourceFiles) => host.writeFile(fileName, data, writeByteOrderMark, onError, sourceFiles)),
isEmitBlocked,
};
}
@@ -1286,7 +1286,7 @@ namespace ts {
}
function processRootFile(fileName: string, isDefaultLib: boolean) {
processSourceFile(normalizePath(fileName), isDefaultLib);
processSourceFile(normalizePath(fileName), isDefaultLib, /*isReference*/ true);
}
function fileReferenceIsEqualTo(a: FileReference, b: FileReference): boolean {
@@ -1380,7 +1380,10 @@ namespace ts {
}
}
function processSourceFile(fileName: string, isDefaultLib: boolean, refFile?: SourceFile, refPos?: number, refEnd?: number) {
/**
* 'isReference' indicates whether the file was brought in via a reference directive (rather than an import declaration)
*/
function processSourceFile(fileName: string, isDefaultLib: boolean, isReference: boolean, refFile?: SourceFile, refPos?: number, refEnd?: number) {
let diagnosticArgument: string[];
let diagnostic: DiagnosticMessage;
if (hasExtension(fileName)) {
@@ -1388,7 +1391,7 @@ namespace ts {
diagnostic = Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1;
diagnosticArgument = [fileName, "'" + supportedExtensions.join("', '") + "'"];
}
else if (!findSourceFile(fileName, toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd)) {
else if (!findSourceFile(fileName, toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, isReference, refFile, refPos, refEnd)) {
diagnostic = Diagnostics.File_0_not_found;
diagnosticArgument = [fileName];
}
@@ -1398,13 +1401,13 @@ namespace ts {
}
}
else {
const nonTsFile: SourceFile = options.allowNonTsExtensions && findSourceFile(fileName, toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd);
const nonTsFile: SourceFile = options.allowNonTsExtensions && findSourceFile(fileName, toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, isReference, refFile, refPos, refEnd);
if (!nonTsFile) {
if (options.allowNonTsExtensions) {
diagnostic = Diagnostics.File_0_not_found;
diagnosticArgument = [fileName];
}
else if (!forEach(supportedExtensions, extension => findSourceFile(fileName + extension, toPath(fileName + extension, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd))) {
else if (!forEach(supportedExtensions, extension => findSourceFile(fileName + extension, toPath(fileName + extension, currentDirectory, getCanonicalFileName), isDefaultLib, isReference, refFile, refPos, refEnd))) {
diagnostic = Diagnostics.File_0_not_found;
fileName += ".ts";
diagnosticArgument = [fileName];
@@ -1433,7 +1436,7 @@ namespace ts {
}
// Get source file from normalized fileName
function findSourceFile(fileName: string, path: Path, isDefaultLib: boolean, refFile?: SourceFile, refPos?: number, refEnd?: number): SourceFile {
function findSourceFile(fileName: string, path: Path, isDefaultLib: boolean, isReference: boolean, refFile?: SourceFile, refPos?: number, refEnd?: number): SourceFile {
if (filesByName.contains(path)) {
const file = filesByName.get(path);
// try to check if we've already seen this file but with a different casing in path
@@ -1442,6 +1445,10 @@ namespace ts {
reportFileNamesDifferOnlyInCasingError(fileName, file.fileName, refFile, refPos, refEnd);
}
if (file) {
file.wasReferenced = file.wasReferenced || isReference;
}
return file;
}
@@ -1458,6 +1465,7 @@ namespace ts {
filesByName.set(path, file);
if (file) {
file.wasReferenced = file.wasReferenced || isReference;
file.path = path;
if (host.useCaseSensitiveFileNames()) {
@@ -1495,7 +1503,7 @@ namespace ts {
function processReferencedFiles(file: SourceFile, basePath: string) {
forEach(file.referencedFiles, ref => {
const referencedFileName = resolveTripleslashReference(ref.fileName, file.fileName);
processSourceFile(referencedFileName, /*isDefaultLib*/ false, file, ref.pos, ref.end);
processSourceFile(referencedFileName, /*isDefaultLib*/ false, /*isReference*/ true, file, ref.pos, ref.end);
});
}
@@ -1521,7 +1529,7 @@ namespace ts {
i < file.imports.length;
if (shouldAddFile) {
const importedFile = findSourceFile(resolution.resolvedFileName, toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName), /*isDefaultLib*/ false, file, skipTrivia(file.text, file.imports[i].pos), file.imports[i].end);
const importedFile = findSourceFile(resolution.resolvedFileName, toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName), /*isDefaultLib*/ false, /*isReference*/ false, file, skipTrivia(file.text, file.imports[i].pos), file.imports[i].end);
if (importedFile && resolution.isExternalLibraryImport) {
// Since currently irrespective of allowJs, we only look for supportedTypeScript extension external module files,
@@ -1738,24 +1746,7 @@ namespace ts {
}
}
if (options.noEmit) {
if (options.out) {
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "out"));
}
if (options.outFile) {
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "outFile"));
}
if (options.outDir) {
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "outDir"));
}
if (options.declaration) {
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "declaration"));
}
}
else if (options.allowJs && options.declaration) {
if (!options.noEmit && options.allowJs && options.declaration) {
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "declaration"));
}
+1
View File
@@ -114,6 +114,7 @@ namespace ts {
"try": SyntaxKind.TryKeyword,
"type": SyntaxKind.TypeKeyword,
"typeof": SyntaxKind.TypeOfKeyword,
"undefined": SyntaxKind.UndefinedKeyword,
"var": SyntaxKind.VarKeyword,
"void": SyntaxKind.VoidKeyword,
"while": SyntaxKind.WhileKeyword,
+54 -49
View File
@@ -1,8 +1,8 @@
/// <reference path="core.ts"/>
namespace ts {
export type FileWatcherCallback = (path: string, removed?: boolean) => void;
export type DirectoryWatcherCallback = (path: string) => void;
export type FileWatcherCallback = (fileName: string, removed?: boolean) => void;
export type DirectoryWatcherCallback = (directoryName: string) => void;
export interface System {
args: string[];
@@ -11,7 +11,7 @@ namespace ts {
write(s: string): void;
readFile(path: string, encoding?: string): string;
writeFile(path: string, data: string, writeByteOrderMark?: boolean): void;
watchFile?(path: Path, callback: FileWatcherCallback): FileWatcher;
watchFile?(path: string, callback: FileWatcherCallback): FileWatcher;
watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean): FileWatcher;
resolvePath(path: string): string;
fileExists(path: string): boolean;
@@ -25,7 +25,7 @@ namespace ts {
}
interface WatchedFile {
filePath: Path;
fileName: string;
callback: FileWatcherCallback;
mtime?: Date;
}
@@ -35,7 +35,7 @@ namespace ts {
}
export interface DirectoryWatcher extends FileWatcher {
directoryPath: Path;
directoryName: string;
referenceCount: number;
}
@@ -244,13 +244,13 @@ namespace ts {
return;
}
_fs.stat(watchedFile.filePath, (err: any, stats: any) => {
_fs.stat(watchedFile.fileName, (err: any, stats: any) => {
if (err) {
watchedFile.callback(watchedFile.filePath);
watchedFile.callback(watchedFile.fileName);
}
else if (watchedFile.mtime.getTime() !== stats.mtime.getTime()) {
watchedFile.mtime = getModifiedTime(watchedFile.filePath);
watchedFile.callback(watchedFile.filePath, watchedFile.mtime.getTime() === 0);
watchedFile.mtime = getModifiedTime(watchedFile.fileName);
watchedFile.callback(watchedFile.fileName, watchedFile.mtime.getTime() === 0);
}
});
}
@@ -278,11 +278,11 @@ namespace ts {
}, interval);
}
function addFile(filePath: Path, callback: FileWatcherCallback): WatchedFile {
function addFile(fileName: string, callback: FileWatcherCallback): WatchedFile {
const file: WatchedFile = {
filePath,
fileName,
callback,
mtime: getModifiedTime(filePath)
mtime: getModifiedTime(fileName)
};
watchedFiles.push(file);
@@ -306,26 +306,26 @@ namespace ts {
}
function createWatchedFileSet() {
const dirWatchers = createFileMap<DirectoryWatcher>();
const dirWatchers: Map<DirectoryWatcher> = {};
// One file can have multiple watchers
const fileWatcherCallbacks = createFileMap<FileWatcherCallback[]>();
const fileWatcherCallbacks: Map<FileWatcherCallback[]> = {};
return { addFile, removeFile };
function reduceDirWatcherRefCountForFile(filePath: Path) {
const dirPath = getDirectoryPath(filePath);
if (dirWatchers.contains(dirPath)) {
const watcher = dirWatchers.get(dirPath);
function reduceDirWatcherRefCountForFile(fileName: string) {
const dirName = getDirectoryPath(fileName);
if (hasProperty(dirWatchers, dirName)) {
const watcher = dirWatchers[dirName];
watcher.referenceCount -= 1;
if (watcher.referenceCount <= 0) {
watcher.close();
dirWatchers.remove(dirPath);
delete dirWatchers[dirName];
}
}
}
function addDirWatcher(dirPath: Path): void {
if (dirWatchers.contains(dirPath)) {
const watcher = dirWatchers.get(dirPath);
function addDirWatcher(dirPath: string): void {
if (hasProperty(dirWatchers, dirPath)) {
const watcher = dirWatchers[dirPath];
watcher.referenceCount += 1;
return;
}
@@ -336,52 +336,52 @@ namespace ts {
(eventName: string, relativeFileName: string) => fileEventHandler(eventName, relativeFileName, dirPath)
);
watcher.referenceCount = 1;
dirWatchers.set(dirPath, watcher);
dirWatchers[dirPath] = watcher;
return;
}
function addFileWatcherCallback(filePath: Path, callback: FileWatcherCallback): void {
if (fileWatcherCallbacks.contains(filePath)) {
fileWatcherCallbacks.get(filePath).push(callback);
function addFileWatcherCallback(filePath: string, callback: FileWatcherCallback): void {
if (hasProperty(fileWatcherCallbacks, filePath)) {
fileWatcherCallbacks[filePath].push(callback);
}
else {
fileWatcherCallbacks.set(filePath, [callback]);
fileWatcherCallbacks[filePath] = [callback];
}
}
function addFile(filePath: Path, callback: FileWatcherCallback): WatchedFile {
addFileWatcherCallback(filePath, callback);
addDirWatcher(getDirectoryPath(filePath));
function addFile(fileName: string, callback: FileWatcherCallback): WatchedFile {
addFileWatcherCallback(fileName, callback);
addDirWatcher(getDirectoryPath(fileName));
return { filePath, callback };
return { fileName, callback };
}
function removeFile(watchedFile: WatchedFile) {
removeFileWatcherCallback(watchedFile.filePath, watchedFile.callback);
reduceDirWatcherRefCountForFile(watchedFile.filePath);
removeFileWatcherCallback(watchedFile.fileName, watchedFile.callback);
reduceDirWatcherRefCountForFile(watchedFile.fileName);
}
function removeFileWatcherCallback(filePath: Path, callback: FileWatcherCallback) {
if (fileWatcherCallbacks.contains(filePath)) {
const newCallbacks = copyListRemovingItem(callback, fileWatcherCallbacks.get(filePath));
function removeFileWatcherCallback(filePath: string, callback: FileWatcherCallback) {
if (hasProperty(fileWatcherCallbacks, filePath)) {
const newCallbacks = copyListRemovingItem(callback, fileWatcherCallbacks[filePath]);
if (newCallbacks.length === 0) {
fileWatcherCallbacks.remove(filePath);
delete fileWatcherCallbacks[filePath];
}
else {
fileWatcherCallbacks.set(filePath, newCallbacks);
fileWatcherCallbacks[filePath] = newCallbacks;
}
}
}
function fileEventHandler(eventName: string, relativeFileName: string, baseDirPath: Path) {
function fileEventHandler(eventName: string, relativeFileName: string, baseDirPath: string) {
// When files are deleted from disk, the triggered "rename" event would have a relativefileName of "undefined"
const filePath = typeof relativeFileName !== "string"
const fileName = typeof relativeFileName !== "string"
? undefined
: toPath(relativeFileName, baseDirPath, createGetCanonicalFileName(sys.useCaseSensitiveFileNames));
: ts.getNormalizedAbsolutePath(relativeFileName, baseDirPath);
// Some applications save a working file via rename operations
if ((eventName === "change" || eventName === "rename") && fileWatcherCallbacks.contains(filePath)) {
for (const fileCallback of fileWatcherCallbacks.get(filePath)) {
fileCallback(filePath);
if ((eventName === "change" || eventName === "rename") && hasProperty(fileWatcherCallbacks, fileName)) {
for (const fileCallback of fileWatcherCallbacks[fileName]) {
fileCallback(fileName);
}
}
}
@@ -498,6 +498,11 @@ namespace ts {
const files = _fs.readdirSync(path || ".").sort();
const directories: string[] = [];
for (const current of files) {
// This is necessary because on some file system node fails to exclude
// "." and "..". See https://github.com/nodejs/node/issues/4002
if (current === "." || current === "..") {
continue;
}
const name = combinePaths(path, current);
if (!contains(exclude, getCanonicalPath(name))) {
const stat = _fs.statSync(name);
@@ -526,18 +531,18 @@ namespace ts {
},
readFile,
writeFile,
watchFile: (filePath, callback) => {
watchFile: (fileName, callback) => {
// Node 4.0 stabilized the `fs.watch` function on Windows which avoids polling
// and is more efficient than `fs.watchFile` (ref: https://github.com/nodejs/node/pull/2649
// and https://github.com/Microsoft/TypeScript/issues/4643), therefore
// if the current node.js version is newer than 4, use `fs.watch` instead.
const watchSet = isNode4OrLater() ? watchedFileSet : pollingWatchedFileSet;
const watchedFile = watchSet.addFile(filePath, callback);
const watchedFile = watchSet.addFile(fileName, callback);
return {
close: () => watchSet.removeFile(watchedFile)
};
},
watchDirectory: (path, callback, recursive) => {
watchDirectory: (directoryName, callback, recursive) => {
// Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows
// (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643)
let options: any;
@@ -549,7 +554,7 @@ namespace ts {
}
return _fs.watch(
path,
directoryName,
options,
(eventName: string, relativeFileName: string) => {
// In watchDirectory we only care about adding and removing files (when event name is
@@ -557,7 +562,7 @@ namespace ts {
// event name is "change")
if (eventName === "rename") {
// When deleting a file, the passed baseFileName is null
callback(!relativeFileName ? relativeFileName : normalizePath(combinePaths(path, relativeFileName)));
callback(!relativeFileName ? relativeFileName : normalizePath(combinePaths(directoryName, relativeFileName)));
};
}
);
+48 -9
View File
@@ -171,6 +171,7 @@ namespace ts {
StringKeyword,
SymbolKeyword,
TypeKeyword,
UndefinedKeyword,
FromKeyword,
GlobalKeyword,
OfKeyword, // LastKeyword and LastToken
@@ -240,6 +241,7 @@ namespace ts {
OmittedExpression,
ExpressionWithTypeArguments,
AsExpression,
NonNullExpression,
// Misc
TemplateSpan,
@@ -274,6 +276,7 @@ namespace ts {
ModuleDeclaration,
ModuleBlock,
CaseBlock,
GlobalModuleExportDeclaration,
ImportEqualsDeclaration,
ImportDeclaration,
ImportClause,
@@ -474,6 +477,11 @@ namespace ts {
originalKeywordKind?: SyntaxKind; // Original syntaxKind which get set so that we can report an error later
}
// Transient identifier node (marked by id === -1)
export interface TransientIdentifier extends Identifier {
resolvedSymbol: Symbol;
}
// @kind(SyntaxKind.QualifiedName)
export interface QualifiedName extends Node {
// Must have same layout as PropertyAccess
@@ -967,6 +975,8 @@ namespace ts {
name: Identifier;
}
export type IdentifierOrPropertyAccess = Identifier | PropertyAccessExpression;
// @kind(SyntaxKind.ElementAccessExpression)
export interface ElementAccessExpression extends MemberExpression {
expression: LeftHandSideExpression;
@@ -1011,6 +1021,11 @@ namespace ts {
export type AssertionExpression = TypeAssertion | AsExpression;
// @kind(SyntaxKind.NonNullExpression)
export interface NonNullExpression extends LeftHandSideExpression {
expression: Expression;
}
/// A JSX expression of the form <TagName attrs>...</TagName>
// @kind(SyntaxKind.JsxElement)
export interface JsxElement extends PrimaryExpression {
@@ -1326,6 +1341,12 @@ namespace ts {
name: Identifier;
}
// @kind(SyntaxKind.GlobalModuleImport)
export interface GlobalModuleExportDeclaration extends DeclarationStatement {
name: Identifier;
moduleReference: LiteralLikeNode;
}
// @kind(SyntaxKind.ExportDeclaration)
export interface ExportDeclaration extends DeclarationStatement {
exportClause?: NamedExports;
@@ -1539,6 +1560,8 @@ namespace ts {
/* @internal */ externalModuleIndicator: Node;
// The first node that causes this file to be a CommonJS module
/* @internal */ commonJsModuleIndicator: Node;
// True if the file was a root file in a compilation or a /// reference targets
/* @internal */ wasReferenced?: boolean;
/* @internal */ identifiers: Map<string>;
/* @internal */ nodeCount: number;
@@ -1575,7 +1598,7 @@ namespace ts {
}
export interface WriteFileCallback {
(fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void;
(fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: SourceFile[]): void;
}
export class OperationCanceledException { }
@@ -1997,6 +2020,7 @@ namespace ts {
members?: SymbolTable; // Class, interface or literal instance members
exports?: SymbolTable; // Module exports
globalExports?: SymbolTable; // Conditional global UMD exports
/* @internal */ id?: number; // Unique id (used to look up SymbolLinks)
/* @internal */ mergeId?: number; // Merge id (used to look up merged symbol)
/* @internal */ parent?: Symbol; // Parent symbol
@@ -2019,7 +2043,9 @@ namespace ts {
exportsChecked?: boolean; // True if exports of external module have been checked
isDeclarationWithCollidingName?: boolean; // True if symbol is block scoped redeclaration
bindingElement?: BindingElement; // Binding element associated with property symbol
exportsSomeValue?: boolean; // true if module exports some value (not just types)
exportsSomeValue?: boolean; // True if module exports some value (not just types)
firstAssignmentChecked?: boolean; // True if first assignment node has been computed
firstAssignment?: Node; // First assignment node (undefined if no assignments)
}
/* @internal */
@@ -2062,7 +2088,7 @@ namespace ts {
isVisible?: boolean; // Is this node visible
generatedName?: string; // Generated name for module, enum, or import declaration
generatedNames?: Map<string>; // Generated names table for source file
assignmentChecks?: Map<boolean>; // Cache of assignment checks
assignmentMap?: Map<boolean>; // Cached map of references assigned within this node
hasReportedStatementInAmbientContext?: boolean; // Cache boolean if we report statements in ambient context
importOnRightSide?: Symbol; // for import declarations - import that appear on the right side
jsxFlags?: JsxFlags; // flags for knowing what kind of element/attributes we're dealing with
@@ -2096,7 +2122,7 @@ namespace ts {
/* @internal */
FreshObjectLiteral = 0x00100000, // Fresh object literal type
/* @internal */
ContainsUndefinedOrNull = 0x00200000, // Type is or contains Undefined or Null type
ContainsUndefinedOrNull = 0x00200000, // Type is or contains undefined or null type
/* @internal */
ContainsObjectLiteral = 0x00400000, // Type is or contains object literal type
/* @internal */
@@ -2105,6 +2131,8 @@ namespace ts {
ThisType = 0x02000000, // This type
ObjectLiteralPatternWithComputedProperties = 0x04000000, // Object literal type implied by binding pattern has computed properties
/* @internal */
Nullable = Undefined | Null,
/* @internal */
Intrinsic = Any | String | Number | Boolean | ESSymbol | Void | Undefined | Null,
/* @internal */
@@ -2372,6 +2400,8 @@ namespace ts {
export type PathSubstitutions = Map<string[]>;
export type TsConfigOnlyOptions = RootPaths | PathSubstitutions;
export type CompilerOptionsValue = string | number | boolean | (string | number)[] | TsConfigOnlyOptions;
export interface CompilerOptions {
allowNonTsExtensions?: boolean;
charset?: string;
@@ -2429,6 +2459,8 @@ namespace ts {
allowSyntheticDefaultImports?: boolean;
allowJs?: boolean;
noImplicitUseStrict?: boolean;
strictNullChecks?: boolean;
lib?: string[];
/* @internal */ stripInternal?: boolean;
// Skip checking lib.d.ts to help speed up tests.
@@ -2436,7 +2468,9 @@ namespace ts {
// Do not perform validation of output file name in transpile scenarios
/* @internal */ suppressOutputPathCheck?: boolean;
[option: string]: string | number | boolean | TsConfigOnlyOptions;
list?: string[];
[option: string]: CompilerOptionsValue;
}
export interface TypingOptions {
@@ -2521,7 +2555,7 @@ namespace ts {
/* @internal */
export interface CommandLineOptionBase {
name: string;
type: "string" | "number" | "boolean" | "object" | Map<number>; // a value of a primitive type, or an object literal mapping named values to actual values
type: "string" | "number" | "boolean" | "object" | "list" | Map<number | string>; // a value of a primitive type, 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
@@ -2537,8 +2571,7 @@ namespace ts {
/* @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'
type: Map<number | string>; // an object literal mapping named values to actual values
}
/* @internal */
@@ -2547,7 +2580,13 @@ namespace ts {
}
/* @internal */
export type CommandLineOption = CommandLineOptionOfCustomType | CommandLineOptionOfPrimitiveType | TsConfigOnlyOption;
export interface CommandLineOptionOfListType extends CommandLineOptionBase {
type: "list";
element: CommandLineOptionOfCustomType | CommandLineOptionOfPrimitiveType;
}
/* @internal */
export type CommandLineOption = CommandLineOptionOfCustomType | CommandLineOptionOfPrimitiveType | TsConfigOnlyOption | CommandLineOptionOfListType;
/* @internal */
export const enum CharacterCodes {
+21 -4
View File
@@ -511,6 +511,7 @@ namespace ts {
case SyntaxKind.StringKeyword:
case SyntaxKind.BooleanKeyword:
case SyntaxKind.SymbolKeyword:
case SyntaxKind.UndefinedKeyword:
return true;
case SyntaxKind.VoidKeyword:
return node.parent.kind !== SyntaxKind.VoidExpression;
@@ -952,6 +953,16 @@ namespace ts {
return node.kind === SyntaxKind.ElementAccessExpression;
}
export function isJSXTagName(node: Node) {
const parent = node.parent;
if (parent.kind === SyntaxKind.JsxOpeningElement ||
parent.kind === SyntaxKind.JsxSelfClosingElement ||
parent.kind === SyntaxKind.JsxClosingElement) {
return (<JsxOpeningLikeElement>parent).tagName === node;
}
return false;
}
export function isExpression(node: Node): boolean {
switch (node.kind) {
case SyntaxKind.SuperKeyword:
@@ -968,6 +979,7 @@ namespace ts {
case SyntaxKind.TaggedTemplateExpression:
case SyntaxKind.AsExpression:
case SyntaxKind.TypeAssertionExpression:
case SyntaxKind.NonNullExpression:
case SyntaxKind.ParenthesizedExpression:
case SyntaxKind.FunctionExpression:
case SyntaxKind.ClassExpression:
@@ -992,9 +1004,9 @@ namespace ts {
while (node.parent.kind === SyntaxKind.QualifiedName) {
node = node.parent;
}
return node.parent.kind === SyntaxKind.TypeQuery;
return node.parent.kind === SyntaxKind.TypeQuery || isJSXTagName(node);
case SyntaxKind.Identifier:
if (node.parent.kind === SyntaxKind.TypeQuery) {
if (node.parent.kind === SyntaxKind.TypeQuery || isJSXTagName(node)) {
return true;
}
// fall through
@@ -1105,6 +1117,9 @@ namespace ts {
/// Given a BinaryExpression, returns SpecialPropertyAssignmentKind for the various kinds of property
/// assignments we treat as special in the binder
export function getSpecialPropertyAssignmentKind(expression: Node): SpecialPropertyAssignmentKind {
if (!isInJavaScriptFile(expression)) {
return SpecialPropertyAssignmentKind.None;
}
if (expression.kind !== SyntaxKind.BinaryExpression) {
return SpecialPropertyAssignmentKind.None;
}
@@ -1471,6 +1486,7 @@ namespace ts {
// export default ...
export function isAliasSymbolDeclaration(node: Node): boolean {
return node.kind === SyntaxKind.ImportEqualsDeclaration ||
node.kind === SyntaxKind.GlobalModuleExportDeclaration ||
node.kind === SyntaxKind.ImportClause && !!(<ImportClause>node).name ||
node.kind === SyntaxKind.NamespaceImport ||
node.kind === SyntaxKind.ImportSpecifier ||
@@ -2106,10 +2122,10 @@ namespace ts {
return combinePaths(newDirPath, sourceFilePath);
}
export function writeFile(host: EmitHost, diagnostics: DiagnosticCollection, fileName: string, data: string, writeByteOrderMark: boolean) {
export function writeFile(host: EmitHost, diagnostics: DiagnosticCollection, fileName: string, data: string, writeByteOrderMark: boolean, sourceFiles?: SourceFile[]) {
host.writeFile(fileName, data, writeByteOrderMark, hostErrorMessage => {
diagnostics.add(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage));
});
}, sourceFiles);
}
export function getLineOfLocalPosition(currentSourceFile: SourceFile, pos: number) {
@@ -2402,6 +2418,7 @@ namespace ts {
case SyntaxKind.ElementAccessExpression:
case SyntaxKind.NewExpression:
case SyntaxKind.CallExpression:
case SyntaxKind.NonNullExpression:
case SyntaxKind.JsxElement:
case SyntaxKind.JsxSelfClosingElement:
case SyntaxKind.TaggedTemplateExpression:
+1 -1
View File
@@ -88,7 +88,7 @@ class CompilerBaselineRunner extends RunnerBase {
toBeCompiled = [];
otherFiles = [];
if (/require\(/.test(lastUnit.content) || /reference\spath/.test(lastUnit.content)) {
if (testCaseContent.settings["noImplicitReferences"] || /require\(/.test(lastUnit.content) || /reference\spath/.test(lastUnit.content)) {
toBeCompiled.push({ unitName: this.makeUnitName(lastUnit.name, rootDir), content: lastUnit.content });
units.forEach(unit => {
if (unit.name !== lastUnit.name) {
+1 -1
View File
@@ -1414,7 +1414,7 @@ namespace FourSlash {
return;
}
const incrementalSourceFile = this.languageService.getSourceFile(this.activeFile.fileName);
const incrementalSourceFile = this.languageService.getNonBoundSourceFile(this.activeFile.fileName);
Utils.assertInvariants(incrementalSourceFile, /*parent:*/ undefined);
const incrementalSyntaxDiagnostics = incrementalSourceFile.parseDiagnostics;
+3 -2
View File
@@ -876,7 +876,7 @@ namespace Harness {
useCaseSensitiveFileNames: () => useCaseSensitiveFileNames,
getNewLine: () => newLine,
fileExists: fileName => getSourceFile(fileName, ts.ScriptTarget.ES5) !== undefined,
readFile: (fileName: string): string => { throw new Error("NotYetImplemented"); }
readFile: (fileName: string): string => { return Harness.IO.readFile(fileName); }
};
}
@@ -896,7 +896,8 @@ namespace Harness {
{ name: "fileName", type: "string" },
{ name: "libFiles", type: "string" },
{ name: "noErrorTruncation", type: "boolean" },
{ name: "suppressOutputPathCheck", type: "boolean" }
{ name: "suppressOutputPathCheck", type: "boolean" },
{ name: "noImplicitReferences", type: "boolean" }
];
let optionsIndex: ts.Map<ts.CommandLineOption>;
+1 -1
View File
@@ -423,7 +423,7 @@ namespace Harness.LanguageService {
getProgram(): ts.Program {
throw new Error("Program can not be marshaled across the shim layer.");
}
getSourceFile(fileName: string): ts.SourceFile {
getNonBoundSourceFile(fileName: string): ts.SourceFile {
throw new Error("SourceFile can not be marshaled across the shim layer.");
}
dispose(): void { this.shim.dispose({}); }
+4 -6
View File
@@ -31,22 +31,20 @@ namespace RWC {
let otherFiles: Harness.Compiler.TestFile[] = [];
let compilerResult: Harness.Compiler.CompilerResult;
let compilerOptions: ts.CompilerOptions;
let baselineOpts: Harness.Baseline.BaselineOptions = {
const baselineOpts: Harness.Baseline.BaselineOptions = {
Subfolder: "rwc",
Baselinefolder: "internal/baselines"
};
let baseName = /(.*)\/(.*).json/.exec(ts.normalizeSlashes(jsonPath))[2];
const baseName = /(.*)\/(.*).json/.exec(ts.normalizeSlashes(jsonPath))[2];
let currentDirectory: string;
let useCustomLibraryFile: boolean;
after(() => {
// Mocha holds onto the closure environment of the describe callback even after the test is done.
// Therefore we have to clean out large objects after the test is done.
inputFiles = undefined;
otherFiles = undefined;
inputFiles = [];
otherFiles = [];
compilerResult = undefined;
compilerOptions = undefined;
baselineOpts = undefined;
baseName = undefined;
currentDirectory = undefined;
// useCustomLibraryFile is a flag specified in the json object to indicate whether to use built/local/lib.d.ts
// or to use lib.d.ts inside the json object. If the flag is true, use the lib.d.ts inside json file
+24 -24
View File
@@ -307,13 +307,13 @@ interface String {
* Matches a string with a regular expression, and returns an array containing the results of that search.
* @param regexp A variable name or string literal containing the regular expression pattern and flags.
*/
match(regexp: string): RegExpMatchArray;
match(regexp: string): RegExpMatchArray | null;
/**
* Matches a string with a regular expression, and returns an array containing the results of that search.
* @param regexp A regular expression object that contains the regular expression pattern and applicable flags.
*/
match(regexp: RegExp): RegExpMatchArray;
match(regexp: RegExp): RegExpMatchArray | null;
/**
* Replaces text in a string, using a regular expression or search string.
@@ -816,7 +816,7 @@ interface RegExp {
* Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
* @param string The String object or string literal on which to perform the search.
*/
exec(string: string): RegExpExecArray;
exec(string: string): RegExpExecArray | null;
/**
* Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
@@ -839,7 +839,7 @@ interface RegExp {
lastIndex: number;
// Non-standard extensions
compile(): RegExp;
compile(): this;
}
interface RegExpConstructor {
@@ -1111,7 +1111,7 @@ interface Array<T> {
/**
* Removes the last element from an array and returns it.
*/
pop(): T;
pop(): T | undefined;
/**
* Combines two or more arrays.
* @param items Additional items to add to the end of array1.
@@ -1129,7 +1129,7 @@ interface Array<T> {
/**
* Removes the first element from an array and returns it.
*/
shift(): T;
shift(): T | undefined;
/**
* Returns a section of an array.
* @param start The beginning of the specified portion of the array.
@@ -1522,7 +1522,7 @@ interface Int8Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
@@ -1533,7 +1533,7 @@ interface Int8Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
/**
* Performs the specified action for each element in an array.
@@ -1795,7 +1795,7 @@ interface Uint8Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
@@ -1806,7 +1806,7 @@ interface Uint8Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
/**
* Performs the specified action for each element in an array.
@@ -2069,7 +2069,7 @@ interface Uint8ClampedArray {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
@@ -2080,7 +2080,7 @@ interface Uint8ClampedArray {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
/**
* Performs the specified action for each element in an array.
@@ -2342,7 +2342,7 @@ interface Int16Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
@@ -2353,7 +2353,7 @@ interface Int16Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
/**
* Performs the specified action for each element in an array.
@@ -2616,7 +2616,7 @@ interface Uint16Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
@@ -2627,7 +2627,7 @@ interface Uint16Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
/**
* Performs the specified action for each element in an array.
@@ -2889,7 +2889,7 @@ interface Int32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
@@ -2900,7 +2900,7 @@ interface Int32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
/**
* Performs the specified action for each element in an array.
@@ -3162,7 +3162,7 @@ interface Uint32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
@@ -3173,7 +3173,7 @@ interface Uint32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
/**
* Performs the specified action for each element in an array.
@@ -3435,7 +3435,7 @@ interface Float32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
@@ -3446,7 +3446,7 @@ interface Float32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
/**
* Performs the specified action for each element in an array.
@@ -3709,7 +3709,7 @@ interface Float64Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
@@ -3720,7 +3720,7 @@ interface Float64Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
/**
* Performs the specified action for each element in an array.
+8 -8
View File
@@ -34,7 +34,7 @@ interface SymbolConstructor {
* Otherwise, returns a undefined.
* @param sym Symbol to find the key for.
*/
keyFor(sym: symbol): string;
keyFor(sym: symbol): string | undefined;
// Well-known Symbols
@@ -320,7 +320,7 @@ interface Array<T> {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T;
find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T | undefined;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
@@ -331,7 +331,7 @@ interface Array<T> {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: T) => boolean, thisArg?: any): number;
findIndex(predicate: (value: T) => boolean, thisArg?: any): number | undefined;
/**
* Returns the this object after filling the section identified by start and end with value
@@ -407,7 +407,7 @@ interface String {
* If there is no element at that position, the result is undefined.
* If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
*/
codePointAt(pos: number): number;
codePointAt(pos: number): number | undefined;
/**
* Returns true if searchString appears as a substring of the result of converting this
@@ -453,7 +453,7 @@ interface String {
* Matches a string an object that supports being matched against, and returns an array containing the results of that search.
* @param matcher An object that supports being matched against.
*/
match(matcher: { [Symbol.match](string: string): RegExpMatchArray; }): RegExpMatchArray;
match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null;
/**
* Replaces text in a string, using an object that supports replacement within a string.
@@ -723,7 +723,7 @@ interface RegExp {
* that search.
* @param string A string to search within.
*/
[Symbol.match](string: string): RegExpMatchArray;
[Symbol.match](string: string): RegExpMatchArray | null;
/**
* Replaces text in a string, using this regular expression.
@@ -800,7 +800,7 @@ interface Map<K, V> {
delete(key: K): boolean;
entries(): IterableIterator<[K, V]>;
forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void;
get(key: K): V;
get(key: K): V | undefined;
has(key: K): boolean;
keys(): IterableIterator<K>;
set(key: K, value?: V): Map<K, V>;
@@ -821,7 +821,7 @@ declare var Map: MapConstructor;
interface WeakMap<K, V> {
clear(): void;
delete(key: K): boolean;
get(key: K): V;
get(key: K): V | undefined;
has(key: K): boolean;
set(key: K, value?: V): WeakMap<K, V>;
readonly [Symbol.toStringTag]: "WeakMap";
+1 -1
View File
@@ -613,7 +613,7 @@ namespace ts.server {
throw new Error("SourceFile objects are not serializable through the server protocol.");
}
getSourceFile(fileName: string): SourceFile {
getNonBoundSourceFile(fileName: string): SourceFile {
throw new Error("SourceFile objects are not serializable through the server protocol.");
}
+4 -7
View File
@@ -1006,9 +1006,7 @@ namespace ts.server {
info.setFormatOptions(this.getFormatCodeOptions());
this.filenameToScriptInfo[fileName] = info;
if (!info.isOpen) {
info.fileWatcher = this.host.watchFile(
toPath(fileName, fileName, createGetCanonicalFileName(sys.useCaseSensitiveFileNames)),
_ => { this.watchedFileChanged(fileName); });
info.fileWatcher = this.host.watchFile(fileName, _ => { this.watchedFileChanged(fileName); });
}
}
}
@@ -1227,9 +1225,7 @@ namespace ts.server {
}
}
project.finishGraph();
project.projectFileWatcher = this.host.watchFile(
toPath(configFilename, configFilename, createGetCanonicalFileName(sys.useCaseSensitiveFileNames)),
_ => this.watchedProjectConfigFileChanged(project));
project.projectFileWatcher = this.host.watchFile(configFilename, _ => this.watchedProjectConfigFileChanged(project));
this.log("Add recursive watcher for: " + ts.getDirectoryPath(configFilename));
project.directoryWatcher = this.host.watchDirectory(
ts.getDirectoryPath(configFilename),
@@ -1317,6 +1313,7 @@ namespace ts.server {
else {
const defaultOpts = ts.getDefaultCompilerOptions();
defaultOpts.allowNonTsExtensions = true;
defaultOpts.allowJs = true;
this.setCompilerOptions(defaultOpts);
}
this.languageService = ts.createLanguageService(this.host, this.documentRegistry);
@@ -1329,7 +1326,7 @@ namespace ts.server {
}
isExternalModule(filename: string): boolean {
const sourceFile = this.languageService.getSourceFile(filename);
const sourceFile = this.languageService.getNonBoundSourceFile(filename);
return ts.isExternalModule(sourceFile);
}
+11 -3
View File
@@ -72,12 +72,20 @@ namespace ts.formatting {
if (line === 0) {
return [];
}
// get the span for the previous\current line
// After the enter key, the cursor is now at a new line. The new line may or may not contain non-whitespace characters.
// If the new line has only whitespaces, we won't want to format this line, because that would remove the indentation as
// trailing whitespaces. So the end of the formatting span should be the later one between:
// 1. the end of the previous line
// 2. the last non-whitespace character in the current line
let endOfFormatSpan = getEndLinePosition(line, sourceFile);
while (isWhiteSpace(sourceFile.text.charCodeAt(endOfFormatSpan)) && !isLineBreak(sourceFile.text.charCodeAt(endOfFormatSpan))) {
endOfFormatSpan--;
}
let span = {
// get start position for the previous line
pos: getStartPositionOfLine(line - 1, sourceFile),
// get end position for the current line (end value is exclusive so add 1 to the result)
end: getEndLinePosition(line, sourceFile) + 1
// end value is exclusive so add 1 to the result
end: endOfFormatSpan + 1
}
return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatOnEnter);
}
+285 -17
View File
@@ -3,6 +3,12 @@
/* @internal */
namespace ts.NavigationBar {
export function getNavigationBarItems(sourceFile: SourceFile, compilerOptions: CompilerOptions): ts.NavigationBarItem[] {
// TODO: Handle JS files differently in 'navbar' calls for now, but ideally we should unify
// the 'navbar' and 'navto' logic for TypeScript and JavaScript.
if (isSourceFileJavaScript(sourceFile)) {
return getJsNavigationBarItems(sourceFile, compilerOptions);
}
// If the source file has any child items, then it included in the tree
// and takes lexical ownership of all other top-level items.
let hasGlobalNode = false;
@@ -130,7 +136,7 @@ namespace ts.NavigationBar {
return topLevelNodes;
}
function sortNodes(nodes: Node[]): Node[] {
return nodes.slice(0).sort((n1: Declaration, n2: Declaration) => {
if (n1.name && n2.name) {
@@ -147,13 +153,27 @@ namespace ts.NavigationBar {
}
});
}
function addTopLevelNodes(nodes: Node[], topLevelNodes: Node[]): void {
nodes = sortNodes(nodes);
for (let node of nodes) {
switch (node.kind) {
case SyntaxKind.ClassDeclaration:
topLevelNodes.push(node);
for (const member of (<ClassDeclaration>node).members) {
if (member.kind === SyntaxKind.MethodDeclaration || member.kind === SyntaxKind.Constructor) {
type FunctionLikeMember = MethodDeclaration | ConstructorDeclaration;
if ((<FunctionLikeMember>member).body) {
// We do not include methods that does not have child functions in it, because of duplications.
if (hasNamedFunctionDeclarations((<Block>(<FunctionLikeMember>member).body).statements)) {
topLevelNodes.push(member);
}
addTopLevelNodes((<Block>(<MethodDeclaration>member).body).statements, topLevelNodes);
}
}
}
break;
case SyntaxKind.EnumDeclaration:
case SyntaxKind.InterfaceDeclaration:
topLevelNodes.push(node);
@@ -176,29 +196,46 @@ namespace ts.NavigationBar {
}
}
function isTopLevelFunctionDeclaration(functionDeclaration: FunctionLikeDeclaration) {
function hasNamedFunctionDeclarations(nodes: NodeArray<Statement>): boolean {
for (let s of nodes) {
if (s.kind === SyntaxKind.FunctionDeclaration && !isEmpty((<FunctionDeclaration>s).name.text)) {
return true;
}
}
return false;
}
function isTopLevelFunctionDeclaration(functionDeclaration: FunctionLikeDeclaration): boolean {
if (functionDeclaration.kind === SyntaxKind.FunctionDeclaration) {
// A function declaration is 'top level' if it contains any function declarations
// within it.
// A function declaration is 'top level' if it contains any function declarations
// within it.
if (functionDeclaration.body && functionDeclaration.body.kind === SyntaxKind.Block) {
// Proper function declarations can only have identifier names
if (forEach((<Block>functionDeclaration.body).statements,
s => s.kind === SyntaxKind.FunctionDeclaration && !isEmpty((<FunctionDeclaration>s).name.text))) {
if (hasNamedFunctionDeclarations((<Block>functionDeclaration.body).statements)) {
return true;
}
// Or if it is not parented by another function. i.e all functions
// at module scope are 'top level'.
// Or if it is not parented by another function. I.e all functions at module scope are 'top level'.
if (!isFunctionBlock(functionDeclaration.parent)) {
return true;
}
// Or if it is nested inside class methods and constructors.
else {
// We have made sure that a grand parent node exists with 'isFunctionBlock()' above.
const grandParentKind = functionDeclaration.parent.parent.kind;
if (grandParentKind === SyntaxKind.MethodDeclaration ||
grandParentKind === SyntaxKind.Constructor) {
return true;
}
}
}
}
return false;
}
function getItemsWorker(nodes: Node[], createItem: (n: Node) => ts.NavigationBarItem): ts.NavigationBarItem[] {
let items: ts.NavigationBarItem[] = [];
@@ -370,6 +407,10 @@ namespace ts.NavigationBar {
case SyntaxKind.ClassDeclaration:
return createClassItem(<ClassDeclaration>node);
case SyntaxKind.MethodDeclaration:
case SyntaxKind.Constructor:
return createMemberFunctionLikeItem(<MethodDeclaration | ConstructorDeclaration>node);
case SyntaxKind.EnumDeclaration:
return createEnumItem(<EnumDeclaration>node);
@@ -395,19 +436,19 @@ namespace ts.NavigationBar {
let result: string[] = [];
result.push(moduleDeclaration.name.text);
while (moduleDeclaration.body && moduleDeclaration.body.kind === SyntaxKind.ModuleDeclaration) {
moduleDeclaration = <ModuleDeclaration>moduleDeclaration.body;
result.push(moduleDeclaration.name.text);
}
}
return result.join(".");
}
function createModuleItem(node: ModuleDeclaration): NavigationBarItem {
let moduleName = getModuleName(node);
let childItems = getItemsWorker(getChildNodes((<Block>getInnermostModule(node).body).statements), createChildItem);
return getNavigationBarItem(moduleName,
@@ -418,11 +459,11 @@ namespace ts.NavigationBar {
getIndent(node));
}
function createFunctionItem(node: FunctionDeclaration) {
function createFunctionItem(node: FunctionDeclaration): ts.NavigationBarItem {
if (node.body && node.body.kind === SyntaxKind.Block) {
let childItems = getItemsWorker(sortNodes((<Block>node.body).statements), createChildItem);
return getNavigationBarItem(!node.name ? "default": node.name.text ,
return getNavigationBarItem(!node.name ? "default": node.name.text,
ts.ScriptElementKind.functionElement,
getNodeModifiers(node),
[getNodeSpan(node)],
@@ -433,6 +474,31 @@ namespace ts.NavigationBar {
return undefined;
}
function createMemberFunctionLikeItem(node: MethodDeclaration | ConstructorDeclaration): ts.NavigationBarItem {
if (node.body && node.body.kind === SyntaxKind.Block) {
let childItems = getItemsWorker(sortNodes((<Block>node.body).statements), createChildItem);
let scriptElementKind: string;
let memberFunctionName: string;
if (node.kind === SyntaxKind.MethodDeclaration) {
memberFunctionName = getPropertyNameForPropertyNameNode(node.name);
scriptElementKind = ts.ScriptElementKind.memberFunctionElement;
}
else {
memberFunctionName = "constructor";
scriptElementKind = ts.ScriptElementKind.constructorImplementationElement;
}
return getNavigationBarItem(memberFunctionName,
scriptElementKind,
getNodeModifiers(node),
[getNodeSpan(node)],
childItems,
getIndent(node));
}
return undefined;
}
function createSourceFileItem(node: SourceFile): ts.NavigationBarItem {
let childItems = getItemsWorker(getChildNodes(node.statements), createChildItem);
@@ -534,4 +600,206 @@ namespace ts.NavigationBar {
return getTextOfNodeFromSourceText(sourceFile.text, node);
}
}
}
export function getJsNavigationBarItems(sourceFile: SourceFile, compilerOptions: CompilerOptions): NavigationBarItem[] {
const anonFnText = "<function>";
const anonClassText = "<class>";
let indent = 0;
let rootName = isExternalModule(sourceFile) ?
"\"" + escapeString(getBaseFileName(removeFileExtension(normalizePath(sourceFile.fileName)))) + "\""
: "<global>";
let sourceFileItem = getNavBarItem(rootName, ScriptElementKind.moduleElement, [getNodeSpan(sourceFile)]);
let topItem = sourceFileItem;
// Walk the whole file, because we want to also find function expressions - which may be in variable initializer,
// call arguments, expressions, etc...
forEachChild(sourceFile, visitNode);
function visitNode(node: Node) {
const newItem = createNavBarItem(node);
if (newItem) {
topItem.childItems.push(newItem);
}
// Add a level if traversing into a container
if (newItem && (isFunctionLike(node) || isClassLike(node))) {
const lastTop = topItem;
indent++;
topItem = newItem;
forEachChild(node, visitNode);
topItem = lastTop;
indent--;
// If the last item added was an anonymous function expression, and it had no children, discard it.
if (newItem && newItem.text === anonFnText && newItem.childItems.length === 0) {
topItem.childItems.pop();
}
}
else {
forEachChild(node, visitNode);
}
}
function createNavBarItem(node: Node) : NavigationBarItem {
switch (node.kind) {
case SyntaxKind.VariableDeclaration:
// Only add to the navbar if at the top-level of the file
// Note: "const" and "let" are also SyntaxKind.VariableDeclarations
if(node.parent/*VariableDeclarationList*/.parent/*VariableStatement*/
.parent/*SourceFile*/.kind !== SyntaxKind.SourceFile) {
return undefined;
}
// If it is initialized with a function expression, handle it when we reach the function expression node
const varDecl = node as VariableDeclaration;
if (varDecl.initializer && (varDecl.initializer.kind === SyntaxKind.FunctionExpression ||
varDecl.initializer.kind === SyntaxKind.ArrowFunction ||
varDecl.initializer.kind === SyntaxKind.ClassExpression)) {
return undefined;
}
// Fall through
case SyntaxKind.FunctionDeclaration:
case SyntaxKind.ClassDeclaration:
case SyntaxKind.Constructor:
case SyntaxKind.GetAccessor:
case SyntaxKind.SetAccessor:
// "export default function().." looks just like a regular function/class declaration, except with the 'default' flag
const name = node.flags && (node.flags & NodeFlags.Default) && !(node as (Declaration)).name ? "default" :
node.kind === SyntaxKind.Constructor ? "constructor" :
declarationNameToString((node as (Declaration)).name);
return getNavBarItem(name, getScriptKindForElementKind(node.kind), [getNodeSpan(node)]);
case SyntaxKind.FunctionExpression:
case SyntaxKind.ArrowFunction:
case SyntaxKind.ClassExpression:
return getDefineModuleItem(node) || getFunctionOrClassExpressionItem(node);
case SyntaxKind.MethodDeclaration:
const methodDecl = node as MethodDeclaration;
return getNavBarItem(declarationNameToString(methodDecl.name),
ScriptElementKind.memberFunctionElement,
[getNodeSpan(node)]);
case SyntaxKind.ExportAssignment:
// e.g. "export default <expr>"
return getNavBarItem("default", ScriptElementKind.variableElement, [getNodeSpan(node)]);
case SyntaxKind.ImportClause: // e.g. 'def' in: import def from 'mod' (in ImportDeclaration)
if (!(node as ImportClause).name) {
// No default import (this node is still a parent of named & namespace imports, which are handled below)
return undefined;
}
// fall through
case SyntaxKind.ImportSpecifier: // e.g. 'id' in: import {id} from 'mod' (in NamedImports, in ImportClause)
case SyntaxKind.NamespaceImport: // e.g. '* as ns' in: import * as ns from 'mod' (in ImportClause)
case SyntaxKind.ExportSpecifier: // e.g. 'a' or 'b' in: export {a, foo as b} from 'mod'
// Export specifiers are only interesting if they are reexports from another module, or renamed, else they are already globals
if (node.kind === SyntaxKind.ExportSpecifier) {
if (!(node.parent.parent as ExportDeclaration).moduleSpecifier && !(node as ExportSpecifier).propertyName) {
return undefined;
}
}
const decl = node as (ImportSpecifier | ImportClause | NamespaceImport | ExportSpecifier);
if (!decl.name) {
return undefined;
}
const declName = declarationNameToString(decl.name);
return getNavBarItem(declName, ScriptElementKind.constElement, [getNodeSpan(node)]);
default:
return undefined;
}
}
function getNavBarItem(text: string, kind: string, spans: TextSpan[], kindModifiers = ScriptElementKindModifier.none): NavigationBarItem {
return {
text, kind, kindModifiers, spans, childItems: [], indent, bolded: false, grayed: false
}
}
function getDefineModuleItem(node: Node): NavigationBarItem {
if (node.kind !== SyntaxKind.FunctionExpression && node.kind !== SyntaxKind.ArrowFunction) {
return undefined;
}
// No match if this is not a call expression to an identifier named 'define'
if (node.parent.kind !== SyntaxKind.CallExpression) {
return undefined;
}
const callExpr = node.parent as CallExpression;
if (callExpr.expression.kind !== SyntaxKind.Identifier || callExpr.expression.getText() !== 'define') {
return undefined;
}
// Return a module of either the given text in the first argument, or of the source file path
let defaultName = node.getSourceFile().fileName;
if (callExpr.arguments[0].kind === SyntaxKind.StringLiteral) {
defaultName = ((callExpr.arguments[0]) as StringLiteral).text;
}
return getNavBarItem(defaultName, ScriptElementKind.moduleElement, [getNodeSpan(node.parent)]);
}
function getFunctionOrClassExpressionItem(node: Node): NavigationBarItem {
if (node.kind !== SyntaxKind.FunctionExpression &&
node.kind !== SyntaxKind.ArrowFunction &&
node.kind !== SyntaxKind.ClassExpression) {
return undefined;
}
const fnExpr = node as FunctionExpression | ArrowFunction | ClassExpression;
let fnName: string;
if (fnExpr.name && getFullWidth(fnExpr.name) > 0) {
// The expression has an identifier, so use that as the name
fnName = declarationNameToString(fnExpr.name);
}
else {
// See if it is a var initializer. If so, use the var name.
if (fnExpr.parent.kind === SyntaxKind.VariableDeclaration) {
fnName = declarationNameToString((fnExpr.parent as VariableDeclaration).name);
}
// See if it is of the form "<expr> = function(){...}". If so, use the text from the left-hand side.
else if (fnExpr.parent.kind === SyntaxKind.BinaryExpression &&
(fnExpr.parent as BinaryExpression).operatorToken.kind === SyntaxKind.EqualsToken) {
fnName = (fnExpr.parent as BinaryExpression).left.getText();
if (fnName.length > 20) {
fnName = fnName.substring(0, 17) + "...";
}
}
// See if it is a property assignment, and if so use the property name
else if (fnExpr.parent.kind === SyntaxKind.PropertyAssignment &&
(fnExpr.parent as PropertyAssignment).name) {
fnName = (fnExpr.parent as PropertyAssignment).name.getText();
}
else {
fnName = node.kind === SyntaxKind.ClassExpression ? anonClassText : anonFnText;
}
}
const scriptKind = node.kind === SyntaxKind.ClassExpression ? ScriptElementKind.classElement : ScriptElementKind.functionElement;
return getNavBarItem(fnName, scriptKind, [getNodeSpan(node)]);
}
function getNodeSpan(node: Node) {
return node.kind === SyntaxKind.SourceFile
? createTextSpanFromBounds(node.getFullStart(), node.getEnd())
: createTextSpanFromBounds(node.getStart(), node.getEnd());
}
function getScriptKindForElementKind(kind: SyntaxKind) {
switch (kind) {
case SyntaxKind.VariableDeclaration:
return ScriptElementKind.variableElement;
case SyntaxKind.FunctionDeclaration:
return ScriptElementKind.functionElement;
case SyntaxKind.ClassDeclaration:
return ScriptElementKind.classElement;
case SyntaxKind.Constructor:
return ScriptElementKind.constructorImplementationElement;
case SyntaxKind.GetAccessor:
return ScriptElementKind.memberGetAccessorElement;
case SyntaxKind.SetAccessor:
return ScriptElementKind.memberSetAccessorElement;
default:
return "unknown";
}
}
return sourceFileItem.childItems;
}
}
+115 -48
View File
@@ -1113,7 +1113,7 @@ namespace ts {
getProgram(): Program;
getSourceFile(fileName: string): SourceFile;
/* @internal */ getNonBoundSourceFile(fileName: string): SourceFile;
dispose(): void;
}
@@ -2148,8 +2148,23 @@ namespace ts {
export function preProcessFile(sourceText: string, readImportFiles = true, detectJavaScriptImports = false): PreProcessedFileInfo {
const referencedFiles: FileReference[] = [];
const importedFiles: FileReference[] = [];
let ambientExternalModules: string[];
let ambientExternalModules: { ref: FileReference, depth: number }[];
let isNoDefaultLib = false;
let braceNesting = 0;
// assume that text represent an external module if it contains at least one top level import/export
// ambient modules that are found inside external modules are interpreted as module augmentations
let externalModule = false;
function nextToken() {
const token = scanner.scan();
if (token === SyntaxKind.OpenBraceToken) {
braceNesting++;
}
else if (token === SyntaxKind.CloseBraceToken) {
braceNesting--;
}
return token;
}
function processTripleSlashDirectives(): void {
const commentRanges = getLeadingCommentRanges(sourceText, 0);
@@ -2166,21 +2181,33 @@ namespace ts {
});
}
function getFileReference() {
const file = scanner.getTokenValue();
const pos = scanner.getTokenPos();
return {
fileName: file,
pos: pos,
end: pos + file.length
};
}
function recordAmbientExternalModule(): void {
if (!ambientExternalModules) {
ambientExternalModules = [];
}
ambientExternalModules.push(scanner.getTokenValue());
ambientExternalModules.push({ ref: getFileReference(), depth: braceNesting });
}
function recordModuleName() {
const importPath = scanner.getTokenValue();
const pos = scanner.getTokenPos();
importedFiles.push({
fileName: importPath,
pos: pos,
end: pos + importPath.length
});
importedFiles.push(getFileReference());
markAsExternalModuleIfTopLevel();
}
function markAsExternalModuleIfTopLevel() {
if (braceNesting === 0) {
externalModule = true;
}
}
/**
@@ -2190,9 +2217,9 @@ namespace ts {
let token = scanner.getToken();
if (token === SyntaxKind.DeclareKeyword) {
// declare module "mod"
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.ModuleKeyword) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.StringLiteral) {
recordAmbientExternalModule();
}
@@ -2209,7 +2236,8 @@ namespace ts {
function tryConsumeImport(): boolean {
let token = scanner.getToken();
if (token === SyntaxKind.ImportKeyword) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.StringLiteral) {
// import "mod";
recordModuleName();
@@ -2217,9 +2245,9 @@ namespace ts {
}
else {
if (token === SyntaxKind.Identifier || isKeyword(token)) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.FromKeyword) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.StringLiteral) {
// import d from "mod";
recordModuleName();
@@ -2233,7 +2261,7 @@ namespace ts {
}
else if (token === SyntaxKind.CommaToken) {
// consume comma and keep going
token = scanner.scan();
token = nextToken();
}
else {
// unknown syntax
@@ -2242,17 +2270,17 @@ namespace ts {
}
if (token === SyntaxKind.OpenBraceToken) {
token = scanner.scan();
token = nextToken();
// consume "{ a as B, c, d as D}" clauses
// make sure that it stops on EOF
while (token !== SyntaxKind.CloseBraceToken && token !== SyntaxKind.EndOfFileToken) {
token = scanner.scan();
token = nextToken();
}
if (token === SyntaxKind.CloseBraceToken) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.FromKeyword) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.StringLiteral) {
// import {a as A} from "mod";
// import d, {a, b as B} from "mod"
@@ -2262,13 +2290,13 @@ namespace ts {
}
}
else if (token === SyntaxKind.AsteriskToken) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.AsKeyword) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.Identifier || isKeyword(token)) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.FromKeyword) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.StringLiteral) {
// import * as NS from "mod"
// import d, * as NS from "mod"
@@ -2289,19 +2317,20 @@ namespace ts {
function tryConsumeExport(): boolean {
let token = scanner.getToken();
if (token === SyntaxKind.ExportKeyword) {
token = scanner.scan();
markAsExternalModuleIfTopLevel();
token = nextToken();
if (token === SyntaxKind.OpenBraceToken) {
token = scanner.scan();
token = nextToken();
// consume "{ a as B, c, d as D}" clauses
// make sure it stops on EOF
while (token !== SyntaxKind.CloseBraceToken && token !== SyntaxKind.EndOfFileToken) {
token = scanner.scan();
token = nextToken();
}
if (token === SyntaxKind.CloseBraceToken) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.FromKeyword) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.StringLiteral) {
// export {a as A} from "mod";
// export {a, b as B} from "mod"
@@ -2311,9 +2340,9 @@ namespace ts {
}
}
else if (token === SyntaxKind.AsteriskToken) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.FromKeyword) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.StringLiteral) {
// export * from "mod"
recordModuleName();
@@ -2321,9 +2350,9 @@ namespace ts {
}
}
else if (token === SyntaxKind.ImportKeyword) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.Identifier || isKeyword(token)) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.EqualsToken) {
if (tryConsumeRequireCall(/*skipCurrentToken*/ true)) {
return true;
@@ -2339,11 +2368,11 @@ namespace ts {
}
function tryConsumeRequireCall(skipCurrentToken: boolean): boolean {
let token = skipCurrentToken ? scanner.scan() : scanner.getToken();
let token = skipCurrentToken ? nextToken() : scanner.getToken();
if (token === SyntaxKind.RequireKeyword) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.OpenParenToken) {
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.StringLiteral) {
// require("mod");
recordModuleName();
@@ -2357,17 +2386,17 @@ namespace ts {
function tryConsumeDefine(): boolean {
let token = scanner.getToken();
if (token === SyntaxKind.Identifier && scanner.getTokenValue() === "define") {
token = scanner.scan();
token = nextToken();
if (token !== SyntaxKind.OpenParenToken) {
return true;
}
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.StringLiteral) {
// looks like define ("modname", ... - skip string literal and comma
token = scanner.scan();
token = nextToken();
if (token === SyntaxKind.CommaToken) {
token = scanner.scan();
token = nextToken();
}
else {
// unexpected token
@@ -2381,7 +2410,7 @@ namespace ts {
}
// skip open bracket
token = scanner.scan();
token = nextToken();
let i = 0;
// scan until ']' or EOF
while (token !== SyntaxKind.CloseBracketToken && token !== SyntaxKind.EndOfFileToken) {
@@ -2391,7 +2420,7 @@ namespace ts {
i++;
}
token = scanner.scan();
token = nextToken();
}
return true;
@@ -2401,7 +2430,7 @@ namespace ts {
function processImports(): void {
scanner.setText(sourceText);
scanner.scan();
nextToken();
// Look for:
// import "mod";
// import d from "mod"
@@ -2428,7 +2457,7 @@ namespace ts {
continue;
}
else {
scanner.scan();
nextToken();
}
}
@@ -2439,7 +2468,34 @@ namespace ts {
processImports();
}
processTripleSlashDirectives();
return { referencedFiles, importedFiles, isLibFile: isNoDefaultLib, ambientExternalModules };
if (externalModule) {
// for external modules module all nested ambient modules are augmentations
if (ambientExternalModules) {
// move all detected ambient modules to imported files since they need to be resolved
for (const decl of ambientExternalModules) {
importedFiles.push(decl.ref);
}
}
return { referencedFiles, importedFiles, isLibFile: isNoDefaultLib, ambientExternalModules: undefined };
}
else {
// for global scripts ambient modules still can have augmentations - look for ambient modules with depth > 0
let ambientModuleNames: string[];
if (ambientExternalModules) {
for (const decl of ambientExternalModules) {
if (decl.depth === 0) {
if (!ambientModuleNames) {
ambientModuleNames = [];
}
ambientModuleNames.push(decl.ref.fileName);
}
else {
importedFiles.push(decl.ref);
}
}
}
return { referencedFiles, importedFiles, isLibFile: isNoDefaultLib, ambientExternalModules: ambientModuleNames };
}
}
/// Helpers
@@ -3449,7 +3505,18 @@ namespace ts {
// We don't want to complete using the type acquired by the shape
// of the binding pattern; we are only interested in types acquired
// through type declaration or inference.
if (rootDeclaration.initializer || rootDeclaration.type) {
// Also proceed if rootDeclaration is parameter and if its containing function expression\arrow function is contextually typed -
// type of parameter will flow in from the contextual type of the function
let canGetType = !!(rootDeclaration.initializer || rootDeclaration.type);
if (!canGetType && rootDeclaration.kind === SyntaxKind.Parameter) {
if (isExpression(rootDeclaration.parent)) {
canGetType = !!typeChecker.getContextualType(<Expression>rootDeclaration.parent);
}
else if (rootDeclaration.parent.kind === SyntaxKind.MethodDeclaration || rootDeclaration.parent.kind === SyntaxKind.SetAccessor) {
canGetType = isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(<Expression>rootDeclaration.parent.parent);
}
}
if (canGetType) {
typeForObject = typeChecker.getTypeAtLocation(objectLikeContainer);
existingMembers = (<BindingPattern>objectLikeContainer).elements;
}
@@ -6474,7 +6541,7 @@ namespace ts {
}
/// Syntactic features
function getSourceFile(fileName: string): SourceFile {
function getNonBoundSourceFile(fileName: string): SourceFile {
return syntaxTreeCache.getCurrentSourceFile(fileName);
}
@@ -7562,7 +7629,7 @@ namespace ts {
getFormattingEditsAfterKeystroke,
getDocCommentTemplateAtPosition,
getEmitOutput,
getSourceFile,
getNonBoundSourceFile,
getProgram
};
}
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -7,28 +7,28 @@ class Ship {
>Ship : Symbol(Ship, Decl(2dArrays.ts, 1, 1))
isSunk: boolean;
>isSunk : Symbol(isSunk, Decl(2dArrays.ts, 3, 12))
>isSunk : Symbol(Ship.isSunk, Decl(2dArrays.ts, 3, 12))
}
class Board {
>Board : Symbol(Board, Decl(2dArrays.ts, 5, 1))
ships: Ship[];
>ships : Symbol(ships, Decl(2dArrays.ts, 7, 13))
>ships : Symbol(Board.ships, Decl(2dArrays.ts, 7, 13))
>Ship : Symbol(Ship, Decl(2dArrays.ts, 1, 1))
cells: Cell[];
>cells : Symbol(cells, Decl(2dArrays.ts, 8, 18))
>cells : Symbol(Board.cells, Decl(2dArrays.ts, 8, 18))
>Cell : Symbol(Cell, Decl(2dArrays.ts, 0, 0))
private allShipsSunk() {
>allShipsSunk : Symbol(allShipsSunk, Decl(2dArrays.ts, 9, 18))
>allShipsSunk : Symbol(Board.allShipsSunk, Decl(2dArrays.ts, 9, 18))
return this.ships.every(function (val) { return val.isSunk; });
>this.ships.every : Symbol(Array.every, Decl(lib.d.ts, --, --))
>this.ships : Symbol(ships, Decl(2dArrays.ts, 7, 13))
>this.ships : Symbol(Board.ships, Decl(2dArrays.ts, 7, 13))
>this : Symbol(Board, Decl(2dArrays.ts, 5, 1))
>ships : Symbol(ships, Decl(2dArrays.ts, 7, 13))
>ships : Symbol(Board.ships, Decl(2dArrays.ts, 7, 13))
>every : Symbol(Array.every, Decl(lib.d.ts, --, --))
>val : Symbol(val, Decl(2dArrays.ts, 12, 42))
>val.isSunk : Symbol(Ship.isSunk, Decl(2dArrays.ts, 3, 12))
@@ -0,0 +1,70 @@
//// [APISample_parseConfig.ts]
/*
* Note: This test is a public API sample. The sample sources can be found
at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-minimal-compiler
* Please log a "breaking change" issue for any API breaking change affecting this issue
*/
declare var process: any;
declare var console: any;
declare var os: any;
import ts = require("typescript");
function printError(error: ts.Diagnostic): void {
if (!error) {
return;
}
console.log(`${error.file && error.file.fileName}: ${error.messageText}`);
}
export function createProgram(rootFiles: string[], compilerOptionsJson: string): ts.Program {
const { config, error } = ts.parseConfigFileTextToJson("tsconfig.json", compilerOptionsJson)
if (error) {
printError(error);
return undefined;
}
const basePath: string = process.cwd();
const settings = ts.convertCompilerOptionsFromJson(config.config["compilerOptions"], basePath);
if (!settings.options) {
for (const err of settings.errors) {
printError(err);
}
return undefined;
}
return ts.createProgram(rootFiles, settings.options);
}
//// [APISample_parseConfig.js]
/*
* Note: This test is a public API sample. The sample sources can be found
at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-minimal-compiler
* Please log a "breaking change" issue for any API breaking change affecting this issue
*/
"use strict";
var ts = require("typescript");
function printError(error) {
if (!error) {
return;
}
console.log((error.file && error.file.fileName) + ": " + error.messageText);
}
function createProgram(rootFiles, compilerOptionsJson) {
var _a = ts.parseConfigFileTextToJson("tsconfig.json", compilerOptionsJson), config = _a.config, error = _a.error;
if (error) {
printError(error);
return undefined;
}
var basePath = process.cwd();
var settings = ts.convertCompilerOptionsFromJson(config.config["compilerOptions"], basePath);
if (!settings.options) {
for (var _i = 0, _b = settings.errors; _i < _b.length; _i++) {
var err = _b[_i];
printError(err);
}
return undefined;
}
return ts.createProgram(rootFiles, settings.options);
}
exports.createProgram = createProgram;
@@ -29,10 +29,10 @@ declare module A {
>y : Symbol(y, Decl(class.d.ts, 2, 30))
x: number;
>x : Symbol(x, Decl(class.d.ts, 2, 42))
>x : Symbol(Point.x, Decl(class.d.ts, 2, 42))
y: number;
>y : Symbol(y, Decl(class.d.ts, 3, 18))
>y : Symbol(Point.y, Decl(class.d.ts, 3, 18))
}
}
@@ -25,8 +25,8 @@ module A {
>Point : Symbol(Point, Decl(module.d.ts, 0, 18), Decl(classPoint.ts, 0, 10))
constructor(public x: number, public y: number) { }
>x : Symbol(x, Decl(classPoint.ts, 2, 20))
>y : Symbol(y, Decl(classPoint.ts, 2, 37))
>x : Symbol(Point.x, Decl(classPoint.ts, 2, 20))
>y : Symbol(Point.y, Decl(classPoint.ts, 2, 37))
}
}
@@ -3,8 +3,8 @@ class Point {
>Point : Symbol(Point, Decl(ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts, 0, 0), Decl(ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts, 4, 1))
constructor(public x: number, public y: number) { }
>x : Symbol(x, Decl(ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts, 1, 16))
>y : Symbol(y, Decl(ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts, 1, 33))
>x : Symbol(Point.x, Decl(ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts, 1, 16))
>y : Symbol(Point.y, Decl(ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts, 1, 33))
static Origin(): Point { return { x: 0, y: 0 }; }
>Origin : Symbol(Point.Origin, Decl(ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts, 1, 55))
@@ -28,8 +28,8 @@ module A {
>Point : Symbol(Point, Decl(ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts, 11, 10), Decl(ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts, 16, 5))
constructor(public x: number, public y: number) { }
>x : Symbol(x, Decl(ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts, 13, 20))
>y : Symbol(y, Decl(ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts, 13, 37))
>x : Symbol(Point.x, Decl(ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts, 13, 20))
>y : Symbol(Point.y, Decl(ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts, 13, 37))
static Origin(): Point { return { x: 0, y: 0 }; }
>Origin : Symbol(Point.Origin, Decl(ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts, 13, 59))
@@ -3,8 +3,8 @@ class Point {
>Point : Symbol(Point, Decl(ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts, 0, 0), Decl(ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts, 4, 1))
constructor(public x: number, public y: number) { }
>x : Symbol(x, Decl(ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts, 1, 16))
>y : Symbol(y, Decl(ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts, 1, 33))
>x : Symbol(Point.x, Decl(ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts, 1, 16))
>y : Symbol(Point.y, Decl(ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts, 1, 33))
static Origin: Point = { x: 0, y: 0 };
>Origin : Symbol(Point.Origin, Decl(ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts, 1, 55))
@@ -28,8 +28,8 @@ module A {
>Point : Symbol(Point, Decl(ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts, 11, 10), Decl(ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts, 16, 5))
constructor(public x: number, public y: number) { }
>x : Symbol(x, Decl(ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts, 13, 20))
>y : Symbol(y, Decl(ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts, 13, 37))
>x : Symbol(Point.x, Decl(ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts, 13, 20))
>y : Symbol(Point.y, Decl(ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts, 13, 37))
static Origin: Point = { x: 0, y: 0 };
>Origin : Symbol(Point.Origin, Decl(ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts, 13, 59))
@@ -3,8 +3,8 @@ class C {
>C : Symbol(C, Decl(ClassDeclarationWithInvalidConstOnPropertyDeclaration2.ts, 0, 0))
const
>const : Symbol(const, Decl(ClassDeclarationWithInvalidConstOnPropertyDeclaration2.ts, 0, 9))
>const : Symbol(C.const, Decl(ClassDeclarationWithInvalidConstOnPropertyDeclaration2.ts, 0, 9))
x = 10;
>x : Symbol(x, Decl(ClassDeclarationWithInvalidConstOnPropertyDeclaration2.ts, 1, 9))
>x : Symbol(C.x, Decl(ClassDeclarationWithInvalidConstOnPropertyDeclaration2.ts, 1, 9))
}
@@ -14,8 +14,8 @@ module enumdule {
>Point : Symbol(Point, Decl(EnumAndModuleWithSameNameAndCommonRoot.ts, 4, 17))
constructor(public x: number, public y: number) { }
>x : Symbol(x, Decl(EnumAndModuleWithSameNameAndCommonRoot.ts, 7, 20))
>y : Symbol(y, Decl(EnumAndModuleWithSameNameAndCommonRoot.ts, 7, 37))
>x : Symbol(Point.x, Decl(EnumAndModuleWithSameNameAndCommonRoot.ts, 7, 20))
>y : Symbol(Point.y, Decl(EnumAndModuleWithSameNameAndCommonRoot.ts, 7, 37))
}
}
@@ -6,13 +6,13 @@ module A {
>Point : Symbol(Point, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 0, 10))
x: number;
>x : Symbol(x, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 2, 21))
>x : Symbol(Point.x, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 2, 21))
y: number;
>y : Symbol(y, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 3, 18))
>y : Symbol(Point.y, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 3, 18))
fromOrigin(p: Point): number;
>fromOrigin : Symbol(fromOrigin, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 4, 18))
>fromOrigin : Symbol(Point.fromOrigin, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 4, 18))
>p : Symbol(p, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 6, 19))
>Point : Symbol(Point, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 0, 10))
}
@@ -22,11 +22,11 @@ module A {
>Point : Symbol(Point, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 0, 10))
constructor(public x: number, public y: number) { }
>x : Symbol(x, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 10, 20))
>y : Symbol(y, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 10, 37))
>x : Symbol(Point2d.x, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 10, 20))
>y : Symbol(Point2d.y, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 10, 37))
fromOrigin(p: Point) {
>fromOrigin : Symbol(fromOrigin, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 10, 59))
>fromOrigin : Symbol(Point2d.fromOrigin, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 10, 59))
>p : Symbol(p, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 12, 19))
>Point : Symbol(Point, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 0, 10))
@@ -6,10 +6,10 @@ module A {
>Point : Symbol(Point, Decl(ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 0, 10))
x: number;
>x : Symbol(x, Decl(ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 2, 24))
>x : Symbol(Point.x, Decl(ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 2, 24))
y: number;
>y : Symbol(y, Decl(ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 3, 18))
>y : Symbol(Point.y, Decl(ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 3, 18))
}
export var Origin: Point = { x: 0, y: 0 };
@@ -23,7 +23,7 @@ module A {
>Point : Symbol(Point, Decl(ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 0, 10))
z: number;
>z : Symbol(z, Decl(ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 9, 40))
>z : Symbol(Point3d.z, Decl(ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 9, 40))
}
export var Origin3d: Point3d = { x: 0, y: 0, z: 0 };
@@ -39,9 +39,9 @@ module A {
>Point : Symbol(Point, Decl(ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 0, 10))
constructor(public start: TPoint, public end: TPoint) { }
>start : Symbol(start, Decl(ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 16, 20))
>start : Symbol(Line.start, Decl(ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 16, 20))
>TPoint : Symbol(TPoint, Decl(ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 15, 22))
>end : Symbol(end, Decl(ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 16, 41))
>end : Symbol(Line.end, Decl(ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 16, 41))
>TPoint : Symbol(TPoint, Decl(ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 15, 22))
}
}
@@ -6,10 +6,10 @@ module A {
>Point : Symbol(Point, Decl(ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts, 0, 10))
x: number;
>x : Symbol(x, Decl(ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts, 2, 17))
>x : Symbol(Point.x, Decl(ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts, 2, 17))
y: number;
>y : Symbol(y, Decl(ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts, 3, 18))
>y : Symbol(Point.y, Decl(ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts, 3, 18))
}
export class points {
@@ -6,10 +6,10 @@ module A {
>Point : Symbol(Point, Decl(ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts, 0, 10))
x: number;
>x : Symbol(x, Decl(ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts, 2, 17))
>x : Symbol(Point.x, Decl(ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts, 2, 17))
y: number;
>y : Symbol(y, Decl(ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts, 3, 18))
>y : Symbol(Point.y, Decl(ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts, 3, 18))
}
export var Origin: Point = { x: 0, y: 0 };
@@ -23,7 +23,7 @@ module A {
>Point : Symbol(Point, Decl(ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts, 0, 10))
z: number;
>z : Symbol(z, Decl(ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts, 9, 40))
>z : Symbol(Point3d.z, Decl(ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts, 9, 40))
}
export var Origin3d: Point3d = { x: 0, y: 0, z: 0 };
@@ -39,9 +39,9 @@ module A {
>Point : Symbol(Point, Decl(ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts, 0, 10))
constructor(public start: TPoint, public end: TPoint) { }
>start : Symbol(start, Decl(ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts, 16, 20))
>start : Symbol(Line.start, Decl(ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts, 16, 20))
>TPoint : Symbol(TPoint, Decl(ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts, 15, 22))
>end : Symbol(end, Decl(ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts, 16, 41))
>end : Symbol(Line.end, Decl(ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts, 16, 41))
>TPoint : Symbol(TPoint, Decl(ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts, 15, 22))
static fromorigin2d(p: Point): Line<Point>{
@@ -6,19 +6,19 @@ module A {
>Point : Symbol(Point, Decl(ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts, 0, 10))
x: number;
>x : Symbol(x, Decl(ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts, 2, 24))
>x : Symbol(Point.x, Decl(ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts, 2, 24))
y: number;
>y : Symbol(y, Decl(ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts, 3, 18))
>y : Symbol(Point.y, Decl(ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts, 3, 18))
}
export class Line {
>Line : Symbol(Line, Decl(ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts, 5, 5))
constructor(public start: Point, public end: Point) { }
>start : Symbol(start, Decl(ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts, 8, 20))
>start : Symbol(Line.start, Decl(ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts, 8, 20))
>Point : Symbol(Point, Decl(ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts, 0, 10))
>end : Symbol(end, Decl(ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts, 8, 40))
>end : Symbol(Line.end, Decl(ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts, 8, 40))
>Point : Symbol(Point, Decl(ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts, 0, 10))
}
@@ -6,19 +6,19 @@ module A {
>Point : Symbol(Point, Decl(ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts, 0, 10))
x: number;
>x : Symbol(x, Decl(ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts, 2, 17))
>x : Symbol(Point.x, Decl(ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts, 2, 17))
y: number;
>y : Symbol(y, Decl(ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts, 3, 18))
>y : Symbol(Point.y, Decl(ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts, 3, 18))
}
export class Line {
>Line : Symbol(Line, Decl(ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts, 5, 5))
constructor(public start: Point, public end: Point) { }
>start : Symbol(start, Decl(ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts, 8, 20))
>start : Symbol(Line.start, Decl(ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts, 8, 20))
>Point : Symbol(Point, Decl(ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts, 0, 10))
>end : Symbol(end, Decl(ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts, 8, 40))
>end : Symbol(Line.end, Decl(ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts, 8, 40))
>Point : Symbol(Point, Decl(ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts, 0, 10))
}
@@ -6,19 +6,19 @@ module A {
>Point : Symbol(Point, Decl(ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts, 0, 10))
x: number;
>x : Symbol(x, Decl(ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts, 2, 24))
>x : Symbol(Point.x, Decl(ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts, 2, 24))
y: number;
>y : Symbol(y, Decl(ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts, 3, 18))
>y : Symbol(Point.y, Decl(ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts, 3, 18))
}
class Line {
>Line : Symbol(Line, Decl(ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts, 5, 5))
constructor(public start: Point, public end: Point) { }
>start : Symbol(start, Decl(ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts, 8, 20))
>start : Symbol(Line.start, Decl(ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts, 8, 20))
>Point : Symbol(Point, Decl(ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts, 0, 10))
>end : Symbol(end, Decl(ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts, 8, 40))
>end : Symbol(Line.end, Decl(ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts, 8, 40))
>Point : Symbol(Point, Decl(ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts, 0, 10))
}
@@ -6,10 +6,10 @@ module A {
>Point : Symbol(Point, Decl(ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 0, 10))
x: number;
>x : Symbol(x, Decl(ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 2, 28))
>x : Symbol(Point.x, Decl(ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 2, 28))
y: number;
>y : Symbol(y, Decl(ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 3, 18))
>y : Symbol(Point.y, Decl(ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 3, 18))
}
export var Origin: Point = { x: 0, y: 0 };
@@ -23,7 +23,7 @@ module A {
>Point : Symbol(Point, Decl(ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 0, 10))
z: number;
>z : Symbol(z, Decl(ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 9, 44))
>z : Symbol(Point3d.z, Decl(ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 9, 44))
}
export var Origin3d: Point3d = { x: 0, y: 0, z: 0 };
@@ -45,11 +45,11 @@ module A {
>TPoint : Symbol(TPoint, Decl(ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 15, 26))
start: TPoint;
>start : Symbol(start, Decl(ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 16, 41))
>start : Symbol(Line.start, Decl(ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 16, 41))
>TPoint : Symbol(TPoint, Decl(ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 15, 26))
end: TPoint;
>end : Symbol(end, Decl(ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 17, 22))
>end : Symbol(Line.end, Decl(ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 17, 22))
>TPoint : Symbol(TPoint, Decl(ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 15, 26))
}
}
@@ -6,10 +6,10 @@ module A {
>Point : Symbol(Point, Decl(ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts, 0, 10))
x: number;
>x : Symbol(x, Decl(ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts, 2, 21))
>x : Symbol(Point.x, Decl(ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts, 2, 21))
y: number;
>y : Symbol(y, Decl(ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts, 3, 18))
>y : Symbol(Point.y, Decl(ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts, 3, 18))
}
export interface points {
@@ -6,10 +6,10 @@ module A {
>Point : Symbol(Point, Decl(ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts, 0, 10))
x: number;
>x : Symbol(x, Decl(ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts, 2, 21))
>x : Symbol(Point.x, Decl(ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts, 2, 21))
y: number;
>y : Symbol(y, Decl(ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts, 3, 18))
>y : Symbol(Point.y, Decl(ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts, 3, 18))
}
export var Origin: Point = { x: 0, y: 0 };
@@ -23,7 +23,7 @@ module A {
>Point : Symbol(Point, Decl(ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts, 0, 10))
z: number;
>z : Symbol(z, Decl(ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts, 9, 44))
>z : Symbol(Point3d.z, Decl(ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts, 9, 44))
}
export var Origin3d: Point3d = { x: 0, y: 0, z: 0 };
@@ -45,11 +45,11 @@ module A {
>TPoint : Symbol(TPoint, Decl(ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts, 15, 26))
start: TPoint;
>start : Symbol(start, Decl(ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts, 16, 41))
>start : Symbol(Line.start, Decl(ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts, 16, 41))
>TPoint : Symbol(TPoint, Decl(ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts, 15, 26))
end: TPoint;
>end : Symbol(end, Decl(ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts, 18, 22))
>end : Symbol(Line.end, Decl(ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts, 18, 22))
>TPoint : Symbol(TPoint, Decl(ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts, 15, 26))
}
}
@@ -6,8 +6,8 @@ module A {
>Point : Symbol(Point, Decl(ExportModuleWithAccessibleTypesOnItsExportedMembers.ts, 0, 10))
constructor(public x: number, public y: number) { }
>x : Symbol(x, Decl(ExportModuleWithAccessibleTypesOnItsExportedMembers.ts, 3, 20))
>y : Symbol(y, Decl(ExportModuleWithAccessibleTypesOnItsExportedMembers.ts, 3, 37))
>x : Symbol(Point.x, Decl(ExportModuleWithAccessibleTypesOnItsExportedMembers.ts, 3, 20))
>y : Symbol(Point.y, Decl(ExportModuleWithAccessibleTypesOnItsExportedMembers.ts, 3, 37))
}
export module B {
@@ -6,8 +6,8 @@ module A {
>Point : Symbol(Point, Decl(ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts, 0, 10))
constructor(public x: number, public y: number) { }
>x : Symbol(x, Decl(ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts, 3, 20))
>y : Symbol(y, Decl(ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts, 3, 37))
>x : Symbol(Point.x, Decl(ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts, 3, 20))
>y : Symbol(Point.y, Decl(ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts, 3, 37))
}
export var Origin: Point = { x: 0, y: 0 };
@@ -6,8 +6,8 @@ module A {
>Point : Symbol(Point, Decl(ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts, 0, 10))
constructor(public x: number, public y: number) { }
>x : Symbol(x, Decl(ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts, 3, 20))
>y : Symbol(y, Decl(ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts, 3, 37))
>x : Symbol(Point.x, Decl(ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts, 3, 20))
>y : Symbol(Point.y, Decl(ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts, 3, 37))
}
export var UnitSquare : {
@@ -6,7 +6,7 @@ module A {
>B : Symbol(B, Decl(ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts, 0, 10))
id: number;
>id : Symbol(id, Decl(ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts, 1, 13))
>id : Symbol(B.id, Decl(ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts, 1, 13))
}
export var beez: Array<B>;
@@ -6,10 +6,10 @@ module A {
>Point : Symbol(Point, Decl(ExportVariableWithAccessibleTypeInTypeAnnotation.ts, 0, 10))
x: number;
>x : Symbol(x, Decl(ExportVariableWithAccessibleTypeInTypeAnnotation.ts, 2, 28))
>x : Symbol(Point.x, Decl(ExportVariableWithAccessibleTypeInTypeAnnotation.ts, 2, 28))
y: number;
>y : Symbol(y, Decl(ExportVariableWithAccessibleTypeInTypeAnnotation.ts, 3, 18))
>y : Symbol(Point.y, Decl(ExportVariableWithAccessibleTypeInTypeAnnotation.ts, 3, 18))
}
// valid since Point is exported
@@ -6,10 +6,10 @@ module A {
>Point : Symbol(Point, Decl(ExportVariableWithInaccessibleTypeInTypeAnnotation.ts, 0, 10))
x: number;
>x : Symbol(x, Decl(ExportVariableWithInaccessibleTypeInTypeAnnotation.ts, 2, 28))
>x : Symbol(Point.x, Decl(ExportVariableWithInaccessibleTypeInTypeAnnotation.ts, 2, 28))
y: number;
>y : Symbol(y, Decl(ExportVariableWithInaccessibleTypeInTypeAnnotation.ts, 3, 18))
>y : Symbol(Point.y, Decl(ExportVariableWithInaccessibleTypeInTypeAnnotation.ts, 3, 18))
}
// valid since Point is exported
@@ -24,7 +24,7 @@ module A {
>Point : Symbol(Point, Decl(ExportVariableWithInaccessibleTypeInTypeAnnotation.ts, 0, 10))
z: number;
>z : Symbol(z, Decl(ExportVariableWithInaccessibleTypeInTypeAnnotation.ts, 10, 37))
>z : Symbol(Point3d.z, Decl(ExportVariableWithInaccessibleTypeInTypeAnnotation.ts, 10, 37))
}
// invalid Point3d is not exported
@@ -6,8 +6,8 @@ module enumdule {
>Point : Symbol(Point, Decl(ModuleAndEnumWithSameNameAndCommonRoot.ts, 0, 17))
constructor(public x: number, public y: number) { }
>x : Symbol(x, Decl(ModuleAndEnumWithSameNameAndCommonRoot.ts, 3, 20))
>y : Symbol(y, Decl(ModuleAndEnumWithSameNameAndCommonRoot.ts, 3, 37))
>x : Symbol(Point.x, Decl(ModuleAndEnumWithSameNameAndCommonRoot.ts, 3, 20))
>y : Symbol(Point.y, Decl(ModuleAndEnumWithSameNameAndCommonRoot.ts, 3, 37))
}
}
+2 -2
View File
@@ -3,8 +3,8 @@ interface I {
>I : Symbol(I, Decl(Protected8.ts, 0, 0))
protected
>protected : Symbol(protected, Decl(Protected8.ts, 0, 13))
>protected : Symbol(I.protected, Decl(Protected8.ts, 0, 13))
p
>p : Symbol(p, Decl(Protected8.ts, 1, 12))
>p : Symbol(I.p, Decl(Protected8.ts, 1, 12))
}
+1 -1
View File
@@ -3,5 +3,5 @@ class C {
>C : Symbol(C, Decl(Protected9.ts, 0, 0))
constructor(protected p) { }
>p : Symbol(p, Decl(Protected9.ts, 1, 15))
>p : Symbol(C.p, Decl(Protected9.ts, 1, 15))
}
@@ -6,10 +6,10 @@ module A {
>Point : Symbol(Point, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 0, 10))
x: number;
>x : Symbol(x, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 1, 24))
>x : Symbol(Point.x, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 1, 24))
y: number;
>y : Symbol(y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 2, 18))
>y : Symbol(Point.y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 2, 18))
}
}
@@ -20,7 +20,7 @@ module A {
>Point : Symbol(Point, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 7, 10))
fromCarthesian(p: A.Point) {
>fromCarthesian : Symbol(fromCarthesian, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 8, 17))
>fromCarthesian : Symbol(Point.fromCarthesian, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 8, 17))
>p : Symbol(p, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 9, 23))
>A : Symbol(A, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 0, 0), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 5, 1))
>Point : Symbol(Point, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 0, 10))
@@ -58,7 +58,7 @@ module X.Y.Z {
>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 14))
length: number;
>length : Symbol(length, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 20, 23))
>length : Symbol(Line.length, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 20, 23))
}
}
@@ -75,7 +75,7 @@ module X {
>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 27, 25))
name: string;
>name : Symbol(name, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 28, 24))
>name : Symbol(Line.name, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 28, 24))
}
}
}
@@ -6,13 +6,13 @@ module A {
>Point : Symbol(Point, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 0, 10))
x: number;
>x : Symbol(x, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 1, 28))
>x : Symbol(Point.x, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 1, 28))
y: number;
>y : Symbol(y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 2, 18))
>y : Symbol(Point.y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 2, 18))
toCarth(): Point;
>toCarth : Symbol(toCarth, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 3, 18))
>toCarth : Symbol(Point.toCarth, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 3, 18))
>Point : Symbol(Point, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 0, 10))
}
}
@@ -24,7 +24,7 @@ module A {
>Point : Symbol(Point, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 8, 10))
fromCarth(): Point;
>fromCarth : Symbol(fromCarth, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 9, 21))
>fromCarth : Symbol(Point.fromCarth, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 9, 21))
>Point : Symbol(Point, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 8, 10))
}
}
@@ -72,12 +72,12 @@ module X {
>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 25, 23))
start: A.Point;
>start : Symbol(start, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 26, 24))
>start : Symbol(Line.start, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 26, 24))
>A : Symbol(A, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 0, 0), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 6, 1))
>Point : Symbol(A.Point, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 0, 10))
end: A.Point;
>end : Symbol(end, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 27, 27))
>end : Symbol(Line.end, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 27, 27))
>A : Symbol(A, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 0, 0), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 6, 1))
>Point : Symbol(A.Point, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 0, 10))
}
@@ -6,10 +6,10 @@ module A {
>Point : Symbol(Point, Decl(part1.ts, 0, 10))
x: number;
>x : Symbol(x, Decl(part1.ts, 1, 28))
>x : Symbol(Point.x, Decl(part1.ts, 1, 28))
y: number;
>y : Symbol(y, Decl(part1.ts, 2, 18))
>y : Symbol(Point.y, Decl(part1.ts, 2, 18))
}
export module Utils {
@@ -55,9 +55,9 @@ module A {
>Plane : Symbol(Plane, Decl(part2.ts, 4, 25))
constructor(public tl: Point, public br: Point) { }
>tl : Symbol(tl, Decl(part2.ts, 6, 24))
>tl : Symbol(Plane.tl, Decl(part2.ts, 6, 24))
>Point : Symbol(Point, Decl(part1.ts, 0, 10))
>br : Symbol(br, Decl(part2.ts, 6, 41))
>br : Symbol(Plane.br, Decl(part2.ts, 6, 41))
>Point : Symbol(Point, Decl(part1.ts, 0, 10))
}
}
@@ -6,13 +6,13 @@ module A {
>Point : Symbol(Point, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 0, 10), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 8, 10))
x: number;
>x : Symbol(x, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 1, 28))
>x : Symbol(Point.x, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 1, 28))
y: number;
>y : Symbol(y, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 2, 18))
>y : Symbol(Point.y, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 2, 18))
toCarth(): Point;
>toCarth : Symbol(toCarth, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 3, 18))
>toCarth : Symbol(Point.toCarth, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 3, 18))
>Point : Symbol(Point, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 0, 10), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 8, 10))
}
}
@@ -24,7 +24,7 @@ module A {
>Point : Symbol(Point, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 0, 10), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 8, 10))
fromCarth(): Point;
>fromCarth : Symbol(fromCarth, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 9, 28))
>fromCarth : Symbol(Point.fromCarth, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 9, 28))
>Point : Symbol(Point, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 0, 10), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 8, 10))
}
}
@@ -75,12 +75,12 @@ module X {
>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 14), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 23))
start: A.Point;
>start : Symbol(start, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 26, 31))
>start : Symbol(Line.start, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 26, 31))
>A : Symbol(A, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 0, 0), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 6, 1))
>Point : Symbol(A.Point, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 0, 10), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 8, 10))
end: A.Point;
>end : Symbol(end, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 27, 27))
>end : Symbol(Line.end, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 27, 27))
>A : Symbol(A, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 0, 0), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 6, 1))
>Point : Symbol(A.Point, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 0, 10), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 8, 10))
}
@@ -39,7 +39,7 @@ module X.Y.Z {
>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 14))
length: number;
>length : Symbol(length, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 15, 23))
>length : Symbol(Line.length, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 15, 23))
}
}
@@ -56,7 +56,7 @@ module X {
>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 22, 18))
name: string;
>name : Symbol(name, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 23, 31))
>name : Symbol(Line.name, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 23, 31))
}
}
}
@@ -9,10 +9,10 @@ module Root {
>Point : Symbol(Point, Decl(part1.ts, 1, 21))
x: number;
>x : Symbol(x, Decl(part1.ts, 2, 32))
>x : Symbol(Point.x, Decl(part1.ts, 2, 32))
y: number;
>y : Symbol(y, Decl(part1.ts, 3, 22))
>y : Symbol(Point.y, Decl(part1.ts, 3, 22))
}
export module Utils {
@@ -62,11 +62,11 @@ module otherRoot {
>Plane : Symbol(Plane, Decl(part2.ts, 5, 29))
constructor(public tl: Root.A.Point, public br: Root.A.Point) { }
>tl : Symbol(tl, Decl(part2.ts, 7, 28))
>tl : Symbol(Plane.tl, Decl(part2.ts, 7, 28))
>Root : Symbol(Root, Decl(part1.ts, 0, 0))
>A : Symbol(Root.A, Decl(part1.ts, 0, 13))
>Point : Symbol(Root.A.Point, Decl(part1.ts, 1, 21))
>br : Symbol(br, Decl(part2.ts, 7, 52))
>br : Symbol(Plane.br, Decl(part2.ts, 7, 52))
>Root : Symbol(Root, Decl(part1.ts, 0, 0))
>A : Symbol(Root.A, Decl(part1.ts, 0, 13))
>Point : Symbol(Root.A.Point, Decl(part1.ts, 1, 21))
@@ -6,10 +6,10 @@ module A {
>Point : Symbol(Point, Decl(part1.ts, 0, 10))
x: number;
>x : Symbol(x, Decl(part1.ts, 1, 28))
>x : Symbol(Point.x, Decl(part1.ts, 1, 28))
y: number;
>y : Symbol(y, Decl(part1.ts, 2, 18))
>y : Symbol(Point.y, Decl(part1.ts, 2, 18))
}
export module Utils {
@@ -52,9 +52,9 @@ module A {
>Plane : Symbol(Plane, Decl(part2.ts, 3, 25))
constructor(public tl: Point, public br: Point) { }
>tl : Symbol(tl, Decl(part2.ts, 5, 24))
>tl : Symbol(Plane.tl, Decl(part2.ts, 5, 24))
>Point : Symbol(Point, Decl(part1.ts, 0, 10))
>br : Symbol(br, Decl(part2.ts, 5, 41))
>br : Symbol(Plane.br, Decl(part2.ts, 5, 41))
>Point : Symbol(Point, Decl(part1.ts, 0, 10))
}
}
@@ -3,7 +3,7 @@ class Message {
>Message : Symbol(Message, Decl(TypeGuardWithArrayUnion.ts, 0, 0))
value: string;
>value : Symbol(value, Decl(TypeGuardWithArrayUnion.ts, 0, 15))
>value : Symbol(Message.value, Decl(TypeGuardWithArrayUnion.ts, 0, 15))
}
function saySize(message: Message | Message[]) {
@@ -4,6 +4,6 @@ interface abstract {
>abstract : Symbol(abstract, Decl(abstractInterfaceIdentifierName.ts, 0, 0))
abstract(): void;
>abstract : Symbol(abstract, Decl(abstractInterfaceIdentifierName.ts, 1, 20))
>abstract : Symbol(abstract.abstract, Decl(abstractInterfaceIdentifierName.ts, 1, 20))
}
@@ -3,57 +3,57 @@ interface A {
>A : Symbol(A, Decl(abstractProperty.ts, 0, 0))
prop: string;
>prop : Symbol(prop, Decl(abstractProperty.ts, 0, 13))
>prop : Symbol(A.prop, Decl(abstractProperty.ts, 0, 13))
raw: string;
>raw : Symbol(raw, Decl(abstractProperty.ts, 1, 17))
>raw : Symbol(A.raw, Decl(abstractProperty.ts, 1, 17))
m(): void;
>m : Symbol(m, Decl(abstractProperty.ts, 2, 16))
>m : Symbol(A.m, Decl(abstractProperty.ts, 2, 16))
}
abstract class B implements A {
>B : Symbol(B, Decl(abstractProperty.ts, 4, 1))
>A : Symbol(A, Decl(abstractProperty.ts, 0, 0))
abstract prop: string;
>prop : Symbol(prop, Decl(abstractProperty.ts, 5, 31))
>prop : Symbol(B.prop, Decl(abstractProperty.ts, 5, 31))
abstract raw: string;
>raw : Symbol(raw, Decl(abstractProperty.ts, 6, 26))
>raw : Symbol(B.raw, Decl(abstractProperty.ts, 6, 26))
abstract readonly ro: string;
>ro : Symbol(ro, Decl(abstractProperty.ts, 7, 25))
>ro : Symbol(B.ro, Decl(abstractProperty.ts, 7, 25))
abstract get readonlyProp(): string;
>readonlyProp : Symbol(readonlyProp, Decl(abstractProperty.ts, 8, 33), Decl(abstractProperty.ts, 9, 40))
>readonlyProp : Symbol(B.readonlyProp, Decl(abstractProperty.ts, 8, 33), Decl(abstractProperty.ts, 9, 40))
abstract set readonlyProp(val: string);
>readonlyProp : Symbol(readonlyProp, Decl(abstractProperty.ts, 8, 33), Decl(abstractProperty.ts, 9, 40))
>readonlyProp : Symbol(B.readonlyProp, Decl(abstractProperty.ts, 8, 33), Decl(abstractProperty.ts, 9, 40))
>val : Symbol(val, Decl(abstractProperty.ts, 10, 30))
abstract m(): void;
>m : Symbol(m, Decl(abstractProperty.ts, 10, 43))
>m : Symbol(B.m, Decl(abstractProperty.ts, 10, 43))
}
class C extends B {
>C : Symbol(C, Decl(abstractProperty.ts, 12, 1))
>B : Symbol(B, Decl(abstractProperty.ts, 4, 1))
get prop() { return "foo"; }
>prop : Symbol(prop, Decl(abstractProperty.ts, 13, 19), Decl(abstractProperty.ts, 14, 32))
>prop : Symbol(C.prop, Decl(abstractProperty.ts, 13, 19), Decl(abstractProperty.ts, 14, 32))
set prop(v) { }
>prop : Symbol(prop, Decl(abstractProperty.ts, 13, 19), Decl(abstractProperty.ts, 14, 32))
>prop : Symbol(C.prop, Decl(abstractProperty.ts, 13, 19), Decl(abstractProperty.ts, 14, 32))
>v : Symbol(v, Decl(abstractProperty.ts, 15, 13))
raw = "edge";
>raw : Symbol(raw, Decl(abstractProperty.ts, 15, 19))
>raw : Symbol(C.raw, Decl(abstractProperty.ts, 15, 19))
readonly ro = "readonly please";
>ro : Symbol(ro, Decl(abstractProperty.ts, 16, 17))
>ro : Symbol(C.ro, Decl(abstractProperty.ts, 16, 17))
readonlyProp: string; // don't have to give a value, in fact
>readonlyProp : Symbol(readonlyProp, Decl(abstractProperty.ts, 17, 36))
>readonlyProp : Symbol(C.readonlyProp, Decl(abstractProperty.ts, 17, 36))
m() { }
>m : Symbol(m, Decl(abstractProperty.ts, 18, 25))
>m : Symbol(C.m, Decl(abstractProperty.ts, 18, 25))
}
@@ -3,19 +3,19 @@ class Point {
>Point : Symbol(Point, Decl(accessOverriddenBaseClassMember1.ts, 0, 0))
constructor(public x: number, public y: number) { }
>x : Symbol(x, Decl(accessOverriddenBaseClassMember1.ts, 1, 16))
>y : Symbol(y, Decl(accessOverriddenBaseClassMember1.ts, 1, 33))
>x : Symbol(Point.x, Decl(accessOverriddenBaseClassMember1.ts, 1, 16))
>y : Symbol(Point.y, Decl(accessOverriddenBaseClassMember1.ts, 1, 33))
public toString() {
>toString : Symbol(toString, Decl(accessOverriddenBaseClassMember1.ts, 1, 55))
>toString : Symbol(Point.toString, Decl(accessOverriddenBaseClassMember1.ts, 1, 55))
return "x=" + this.x + " y=" + this.y;
>this.x : Symbol(x, Decl(accessOverriddenBaseClassMember1.ts, 1, 16))
>this.x : Symbol(Point.x, Decl(accessOverriddenBaseClassMember1.ts, 1, 16))
>this : Symbol(Point, Decl(accessOverriddenBaseClassMember1.ts, 0, 0))
>x : Symbol(x, Decl(accessOverriddenBaseClassMember1.ts, 1, 16))
>this.y : Symbol(y, Decl(accessOverriddenBaseClassMember1.ts, 1, 33))
>x : Symbol(Point.x, Decl(accessOverriddenBaseClassMember1.ts, 1, 16))
>this.y : Symbol(Point.y, Decl(accessOverriddenBaseClassMember1.ts, 1, 33))
>this : Symbol(Point, Decl(accessOverriddenBaseClassMember1.ts, 0, 0))
>y : Symbol(y, Decl(accessOverriddenBaseClassMember1.ts, 1, 33))
>y : Symbol(Point.y, Decl(accessOverriddenBaseClassMember1.ts, 1, 33))
}
}
class ColoredPoint extends Point {
@@ -25,7 +25,7 @@ class ColoredPoint extends Point {
constructor(x: number, y: number, public color: string) {
>x : Symbol(x, Decl(accessOverriddenBaseClassMember1.ts, 7, 16))
>y : Symbol(y, Decl(accessOverriddenBaseClassMember1.ts, 7, 26))
>color : Symbol(color, Decl(accessOverriddenBaseClassMember1.ts, 7, 37))
>color : Symbol(ColoredPoint.color, Decl(accessOverriddenBaseClassMember1.ts, 7, 37))
super(x, y);
>super : Symbol(Point, Decl(accessOverriddenBaseClassMember1.ts, 0, 0))
@@ -33,15 +33,15 @@ class ColoredPoint extends Point {
>y : Symbol(y, Decl(accessOverriddenBaseClassMember1.ts, 7, 26))
}
public toString() {
>toString : Symbol(toString, Decl(accessOverriddenBaseClassMember1.ts, 9, 5))
>toString : Symbol(ColoredPoint.toString, Decl(accessOverriddenBaseClassMember1.ts, 9, 5))
return super.toString() + " color=" + this.color;
>super.toString : Symbol(Point.toString, Decl(accessOverriddenBaseClassMember1.ts, 1, 55))
>super : Symbol(Point, Decl(accessOverriddenBaseClassMember1.ts, 0, 0))
>toString : Symbol(Point.toString, Decl(accessOverriddenBaseClassMember1.ts, 1, 55))
>this.color : Symbol(color, Decl(accessOverriddenBaseClassMember1.ts, 7, 37))
>this.color : Symbol(ColoredPoint.color, Decl(accessOverriddenBaseClassMember1.ts, 7, 37))
>this : Symbol(ColoredPoint, Decl(accessOverriddenBaseClassMember1.ts, 5, 1))
>color : Symbol(color, Decl(accessOverriddenBaseClassMember1.ts, 7, 37))
>color : Symbol(ColoredPoint.color, Decl(accessOverriddenBaseClassMember1.ts, 7, 37))
}
}
@@ -4,7 +4,7 @@ class C {
>C : Symbol(C, Decl(accessorWithES5.ts, 0, 0))
get x() {
>x : Symbol(x, Decl(accessorWithES5.ts, 1, 9))
>x : Symbol(C.x, Decl(accessorWithES5.ts, 1, 9))
return 1;
}
@@ -14,7 +14,7 @@ class D {
>D : Symbol(D, Decl(accessorWithES5.ts, 5, 1))
set x(v) {
>x : Symbol(x, Decl(accessorWithES5.ts, 7, 9))
>x : Symbol(D.x, Decl(accessorWithES5.ts, 7, 9))
>v : Symbol(v, Decl(accessorWithES5.ts, 8, 10))
}
}
@@ -6,7 +6,7 @@ class C {
>C : Symbol(C, Decl(additionOperatorWithAnyAndEveryType.ts, 0, 18))
public a: string;
>a : Symbol(a, Decl(additionOperatorWithAnyAndEveryType.ts, 1, 9))
>a : Symbol(C.a, Decl(additionOperatorWithAnyAndEveryType.ts, 1, 9))
static foo() { }
>foo : Symbol(C.foo, Decl(additionOperatorWithAnyAndEveryType.ts, 2, 21))
@@ -9,7 +9,7 @@ interface IHasVisualizationModel {
>IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsage1_main.ts, 1, 50))
VisualizationModel: typeof Backbone.Model;
>VisualizationModel : Symbol(VisualizationModel, Decl(aliasUsage1_main.ts, 2, 34))
>VisualizationModel : Symbol(IHasVisualizationModel.VisualizationModel, Decl(aliasUsage1_main.ts, 2, 34))
>Backbone.Model : Symbol(Backbone.Model, Decl(aliasUsage1_backbone.ts, 0, 0))
>Backbone : Symbol(Backbone, Decl(aliasUsage1_main.ts, 0, 0))
>Model : Symbol(Backbone.Model, Decl(aliasUsage1_backbone.ts, 0, 0))
@@ -18,19 +18,19 @@ class C2 {
>C2 : Symbol(C2, Decl(aliasUsage1_main.ts, 4, 1))
x: IHasVisualizationModel;
>x : Symbol(x, Decl(aliasUsage1_main.ts, 5, 10))
>x : Symbol(C2.x, Decl(aliasUsage1_main.ts, 5, 10))
>IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsage1_main.ts, 1, 50))
get A() {
>A : Symbol(A, Decl(aliasUsage1_main.ts, 6, 30), Decl(aliasUsage1_main.ts, 9, 5))
>A : Symbol(C2.A, Decl(aliasUsage1_main.ts, 6, 30), Decl(aliasUsage1_main.ts, 9, 5))
return this.x;
>this.x : Symbol(x, Decl(aliasUsage1_main.ts, 5, 10))
>this.x : Symbol(C2.x, Decl(aliasUsage1_main.ts, 5, 10))
>this : Symbol(C2, Decl(aliasUsage1_main.ts, 4, 1))
>x : Symbol(x, Decl(aliasUsage1_main.ts, 5, 10))
>x : Symbol(C2.x, Decl(aliasUsage1_main.ts, 5, 10))
}
set A(x) {
>A : Symbol(A, Decl(aliasUsage1_main.ts, 6, 30), Decl(aliasUsage1_main.ts, 9, 5))
>A : Symbol(C2.A, Decl(aliasUsage1_main.ts, 6, 30), Decl(aliasUsage1_main.ts, 9, 5))
>x : Symbol(x, Decl(aliasUsage1_main.ts, 10, 10))
x = moduleA;
@@ -43,7 +43,7 @@ export class Model {
>Model : Symbol(Model, Decl(aliasUsage1_backbone.ts, 0, 0))
public someData: string;
>someData : Symbol(someData, Decl(aliasUsage1_backbone.ts, 0, 20))
>someData : Symbol(Model.someData, Decl(aliasUsage1_backbone.ts, 0, 20))
}
=== tests/cases/compiler/aliasUsage1_moduleA.ts ===
@@ -9,7 +9,7 @@ interface IHasVisualizationModel {
>IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInArray_main.ts, 1, 56))
VisualizationModel: typeof Backbone.Model;
>VisualizationModel : Symbol(VisualizationModel, Decl(aliasUsageInArray_main.ts, 2, 34))
>VisualizationModel : Symbol(IHasVisualizationModel.VisualizationModel, Decl(aliasUsageInArray_main.ts, 2, 34))
>Backbone.Model : Symbol(Backbone.Model, Decl(aliasUsageInArray_backbone.ts, 0, 0))
>Backbone : Symbol(Backbone, Decl(aliasUsageInArray_main.ts, 0, 0))
>Model : Symbol(Backbone.Model, Decl(aliasUsageInArray_backbone.ts, 0, 0))
@@ -30,7 +30,7 @@ export class Model {
>Model : Symbol(Model, Decl(aliasUsageInArray_backbone.ts, 0, 0))
public someData: string;
>someData : Symbol(someData, Decl(aliasUsageInArray_backbone.ts, 0, 20))
>someData : Symbol(Model.someData, Decl(aliasUsageInArray_backbone.ts, 0, 20))
}
=== tests/cases/compiler/aliasUsageInArray_moduleA.ts ===
@@ -9,7 +9,7 @@ interface IHasVisualizationModel {
>IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInFunctionExpression_main.ts, 1, 69))
VisualizationModel: typeof Backbone.Model;
>VisualizationModel : Symbol(VisualizationModel, Decl(aliasUsageInFunctionExpression_main.ts, 2, 34))
>VisualizationModel : Symbol(IHasVisualizationModel.VisualizationModel, Decl(aliasUsageInFunctionExpression_main.ts, 2, 34))
>Backbone.Model : Symbol(Backbone.Model, Decl(aliasUsageInFunctionExpression_backbone.ts, 0, 0))
>Backbone : Symbol(Backbone, Decl(aliasUsageInFunctionExpression_main.ts, 0, 0))
>Model : Symbol(Backbone.Model, Decl(aliasUsageInFunctionExpression_backbone.ts, 0, 0))
@@ -30,7 +30,7 @@ export class Model {
>Model : Symbol(Model, Decl(aliasUsageInFunctionExpression_backbone.ts, 0, 0))
public someData: string;
>someData : Symbol(someData, Decl(aliasUsageInFunctionExpression_backbone.ts, 0, 20))
>someData : Symbol(Model.someData, Decl(aliasUsageInFunctionExpression_backbone.ts, 0, 20))
}
=== tests/cases/compiler/aliasUsageInFunctionExpression_moduleA.ts ===
@@ -9,7 +9,7 @@ interface IHasVisualizationModel {
>IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInGenericFunction_main.ts, 1, 66))
VisualizationModel: typeof Backbone.Model;
>VisualizationModel : Symbol(VisualizationModel, Decl(aliasUsageInGenericFunction_main.ts, 2, 34))
>VisualizationModel : Symbol(IHasVisualizationModel.VisualizationModel, Decl(aliasUsageInGenericFunction_main.ts, 2, 34))
>Backbone.Model : Symbol(Backbone.Model, Decl(aliasUsageInGenericFunction_backbone.ts, 0, 0))
>Backbone : Symbol(Backbone, Decl(aliasUsageInGenericFunction_main.ts, 0, 0))
>Model : Symbol(Backbone.Model, Decl(aliasUsageInGenericFunction_backbone.ts, 0, 0))
@@ -42,7 +42,7 @@ export class Model {
>Model : Symbol(Model, Decl(aliasUsageInGenericFunction_backbone.ts, 0, 0))
public someData: string;
>someData : Symbol(someData, Decl(aliasUsageInGenericFunction_backbone.ts, 0, 20))
>someData : Symbol(Model.someData, Decl(aliasUsageInGenericFunction_backbone.ts, 0, 20))
}
=== tests/cases/compiler/aliasUsageInGenericFunction_moduleA.ts ===
@@ -9,7 +9,7 @@ interface IHasVisualizationModel {
>IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInIndexerOfClass_main.ts, 1, 65))
VisualizationModel: typeof Backbone.Model;
>VisualizationModel : Symbol(VisualizationModel, Decl(aliasUsageInIndexerOfClass_main.ts, 2, 34))
>VisualizationModel : Symbol(IHasVisualizationModel.VisualizationModel, Decl(aliasUsageInIndexerOfClass_main.ts, 2, 34))
>Backbone.Model : Symbol(Backbone.Model, Decl(aliasUsageInIndexerOfClass_backbone.ts, 0, 0))
>Backbone : Symbol(Backbone, Decl(aliasUsageInIndexerOfClass_main.ts, 0, 0))
>Model : Symbol(Backbone.Model, Decl(aliasUsageInIndexerOfClass_backbone.ts, 0, 0))
@@ -22,7 +22,7 @@ class N {
>IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInIndexerOfClass_main.ts, 1, 65))
x = moduleA;
>x : Symbol(x, Decl(aliasUsageInIndexerOfClass_main.ts, 6, 41))
>x : Symbol(N.x, Decl(aliasUsageInIndexerOfClass_main.ts, 6, 41))
>moduleA : Symbol(moduleA, Decl(aliasUsageInIndexerOfClass_main.ts, 0, 67))
}
class N2 {
@@ -33,7 +33,7 @@ class N2 {
>moduleA : Symbol(moduleA, Decl(aliasUsageInIndexerOfClass_main.ts, 0, 67))
x: IHasVisualizationModel;
>x : Symbol(x, Decl(aliasUsageInIndexerOfClass_main.ts, 10, 33))
>x : Symbol(N2.x, Decl(aliasUsageInIndexerOfClass_main.ts, 10, 33))
>IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInIndexerOfClass_main.ts, 1, 65))
}
=== tests/cases/compiler/aliasUsageInIndexerOfClass_backbone.ts ===
@@ -41,7 +41,7 @@ export class Model {
>Model : Symbol(Model, Decl(aliasUsageInIndexerOfClass_backbone.ts, 0, 0))
public someData: string;
>someData : Symbol(someData, Decl(aliasUsageInIndexerOfClass_backbone.ts, 0, 20))
>someData : Symbol(Model.someData, Decl(aliasUsageInIndexerOfClass_backbone.ts, 0, 20))
}
=== tests/cases/compiler/aliasUsageInIndexerOfClass_moduleA.ts ===
@@ -9,7 +9,7 @@ interface IHasVisualizationModel {
>IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInObjectLiteral_main.ts, 1, 64))
VisualizationModel: typeof Backbone.Model;
>VisualizationModel : Symbol(VisualizationModel, Decl(aliasUsageInObjectLiteral_main.ts, 2, 34))
>VisualizationModel : Symbol(IHasVisualizationModel.VisualizationModel, Decl(aliasUsageInObjectLiteral_main.ts, 2, 34))
>Backbone.Model : Symbol(Backbone.Model, Decl(aliasUsageInObjectLiteral_backbone.ts, 0, 0))
>Backbone : Symbol(Backbone, Decl(aliasUsageInObjectLiteral_main.ts, 0, 0))
>Model : Symbol(Backbone.Model, Decl(aliasUsageInObjectLiteral_backbone.ts, 0, 0))
@@ -42,7 +42,7 @@ export class Model {
>Model : Symbol(Model, Decl(aliasUsageInObjectLiteral_backbone.ts, 0, 0))
public someData: string;
>someData : Symbol(someData, Decl(aliasUsageInObjectLiteral_backbone.ts, 0, 20))
>someData : Symbol(Model.someData, Decl(aliasUsageInObjectLiteral_backbone.ts, 0, 20))
}
=== tests/cases/compiler/aliasUsageInObjectLiteral_moduleA.ts ===
@@ -9,7 +9,7 @@ interface IHasVisualizationModel {
>IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInOrExpression_main.ts, 1, 63))
VisualizationModel: typeof Backbone.Model;
>VisualizationModel : Symbol(VisualizationModel, Decl(aliasUsageInOrExpression_main.ts, 2, 34))
>VisualizationModel : Symbol(IHasVisualizationModel.VisualizationModel, Decl(aliasUsageInOrExpression_main.ts, 2, 34))
>Backbone.Model : Symbol(Backbone.Model, Decl(aliasUsageInOrExpression_backbone.ts, 0, 0))
>Backbone : Symbol(Backbone, Decl(aliasUsageInOrExpression_main.ts, 0, 0))
>Model : Symbol(Backbone.Model, Decl(aliasUsageInOrExpression_backbone.ts, 0, 0))
@@ -58,7 +58,7 @@ export class Model {
>Model : Symbol(Model, Decl(aliasUsageInOrExpression_backbone.ts, 0, 0))
public someData: string;
>someData : Symbol(someData, Decl(aliasUsageInOrExpression_backbone.ts, 0, 20))
>someData : Symbol(Model.someData, Decl(aliasUsageInOrExpression_backbone.ts, 0, 20))
}
=== tests/cases/compiler/aliasUsageInOrExpression_moduleA.ts ===
@@ -9,7 +9,7 @@ interface IHasVisualizationModel {
>IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInTypeArgumentOfExtendsClause_main.ts, 1, 78))
VisualizationModel: typeof Backbone.Model;
>VisualizationModel : Symbol(VisualizationModel, Decl(aliasUsageInTypeArgumentOfExtendsClause_main.ts, 2, 34))
>VisualizationModel : Symbol(IHasVisualizationModel.VisualizationModel, Decl(aliasUsageInTypeArgumentOfExtendsClause_main.ts, 2, 34))
>Backbone.Model : Symbol(Backbone.Model, Decl(aliasUsageInTypeArgumentOfExtendsClause_backbone.ts, 0, 0))
>Backbone : Symbol(Backbone, Decl(aliasUsageInTypeArgumentOfExtendsClause_main.ts, 0, 0))
>Model : Symbol(Backbone.Model, Decl(aliasUsageInTypeArgumentOfExtendsClause_backbone.ts, 0, 0))
@@ -20,7 +20,7 @@ class C<T extends IHasVisualizationModel> {
>IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInTypeArgumentOfExtendsClause_main.ts, 1, 78))
x: T;
>x : Symbol(x, Decl(aliasUsageInTypeArgumentOfExtendsClause_main.ts, 5, 43))
>x : Symbol(C.x, Decl(aliasUsageInTypeArgumentOfExtendsClause_main.ts, 5, 43))
>T : Symbol(T, Decl(aliasUsageInTypeArgumentOfExtendsClause_main.ts, 5, 8))
}
class D extends C<IHasVisualizationModel> {
@@ -29,7 +29,7 @@ class D extends C<IHasVisualizationModel> {
>IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInTypeArgumentOfExtendsClause_main.ts, 1, 78))
x = moduleA;
>x : Symbol(x, Decl(aliasUsageInTypeArgumentOfExtendsClause_main.ts, 8, 43))
>x : Symbol(D.x, Decl(aliasUsageInTypeArgumentOfExtendsClause_main.ts, 8, 43))
>moduleA : Symbol(moduleA, Decl(aliasUsageInTypeArgumentOfExtendsClause_main.ts, 0, 80))
}
=== tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause_backbone.ts ===
@@ -37,7 +37,7 @@ export class Model {
>Model : Symbol(Model, Decl(aliasUsageInTypeArgumentOfExtendsClause_backbone.ts, 0, 0))
public someData: string;
>someData : Symbol(someData, Decl(aliasUsageInTypeArgumentOfExtendsClause_backbone.ts, 0, 20))
>someData : Symbol(Model.someData, Decl(aliasUsageInTypeArgumentOfExtendsClause_backbone.ts, 0, 20))
}
=== tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause_moduleA.ts ===
@@ -9,7 +9,7 @@ interface IHasVisualizationModel {
>IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInVarAssignment_main.ts, 1, 64))
VisualizationModel: typeof Backbone.Model;
>VisualizationModel : Symbol(VisualizationModel, Decl(aliasUsageInVarAssignment_main.ts, 2, 34))
>VisualizationModel : Symbol(IHasVisualizationModel.VisualizationModel, Decl(aliasUsageInVarAssignment_main.ts, 2, 34))
>Backbone.Model : Symbol(Backbone.Model, Decl(aliasUsageInVarAssignment_backbone.ts, 0, 0))
>Backbone : Symbol(Backbone, Decl(aliasUsageInVarAssignment_main.ts, 0, 0))
>Model : Symbol(Backbone.Model, Decl(aliasUsageInVarAssignment_backbone.ts, 0, 0))
@@ -28,7 +28,7 @@ export class Model {
>Model : Symbol(Model, Decl(aliasUsageInVarAssignment_backbone.ts, 0, 0))
public someData: string;
>someData : Symbol(someData, Decl(aliasUsageInVarAssignment_backbone.ts, 0, 20))
>someData : Symbol(Model.someData, Decl(aliasUsageInVarAssignment_backbone.ts, 0, 20))
}
=== tests/cases/compiler/aliasUsageInVarAssignment_moduleA.ts ===
@@ -13,6 +13,6 @@ export class Foo {
>Foo : Symbol(Foo, Decl(b.ts, 0, 0))
member: string;
>member : Symbol(member, Decl(b.ts, 0, 18))
>member : Symbol(Foo.member, Decl(b.ts, 0, 18))
}
@@ -13,5 +13,5 @@ export class Foo {
>Foo : Symbol(Foo, Decl(b.ts, 0, 0))
member: string;
>member : Symbol(member, Decl(b.ts, 0, 18))
>member : Symbol(Foo.member, Decl(b.ts, 0, 18))
}
@@ -3,7 +3,7 @@ declare class Foo {
>Foo : Symbol(Foo, Decl(b.d.ts, 0, 0))
member: string;
>member : Symbol(member, Decl(b.d.ts, 0, 19))
>member : Symbol(Foo.member, Decl(b.d.ts, 0, 19))
}
export = Foo;
>Foo : Symbol(Foo, Decl(b.d.ts, 0, 0))
@@ -3,7 +3,7 @@ declare class Foo {
>Foo : Symbol(Foo, Decl(b.d.ts, 0, 0))
member: string;
>member : Symbol(member, Decl(b.d.ts, 0, 19))
>member : Symbol(Foo.member, Decl(b.d.ts, 0, 19))
}
export = Foo;
>Foo : Symbol(Foo, Decl(b.d.ts, 0, 0))
@@ -10,7 +10,7 @@ declare class C {
>C : Symbol(C, Decl(ambientClassDeclarationExtends_singleFile.ts, 1, 29))
public foo;
>foo : Symbol(foo, Decl(ambientClassDeclarationExtends_singleFile.ts, 3, 17))
>foo : Symbol(C.foo, Decl(ambientClassDeclarationExtends_singleFile.ts, 3, 17))
}
namespace D { var x; }
>D : Symbol(D, Decl(ambientClassDeclarationExtends_singleFile.ts, 5, 1), Decl(ambientClassDeclarationExtends_singleFile.ts, 6, 22))
@@ -31,7 +31,7 @@ declare class E {
>E : Symbol(E, Decl(ambientClassDeclarationExtends_file1.ts, 0, 0))
public bar;
>bar : Symbol(bar, Decl(ambientClassDeclarationExtends_file1.ts, 1, 17))
>bar : Symbol(E.bar, Decl(ambientClassDeclarationExtends_file1.ts, 1, 17))
}
namespace F { var y; }
>F : Symbol(F, Decl(ambientClassDeclarationExtends_file1.ts, 3, 1), Decl(ambientClassDeclarationExtends_file2.ts, 0, 0))
@@ -3,20 +3,20 @@ declare class C {
>C : Symbol(C, Decl(ambientClassMergesOverloadsWithInterface.ts, 0, 0), Decl(ambientClassMergesOverloadsWithInterface.ts, 3, 1))
baz(): any;
>baz : Symbol(baz, Decl(ambientClassMergesOverloadsWithInterface.ts, 0, 17))
>baz : Symbol(C.baz, Decl(ambientClassMergesOverloadsWithInterface.ts, 0, 17))
foo(n: number): any;
>foo : Symbol(foo, Decl(ambientClassMergesOverloadsWithInterface.ts, 1, 15), Decl(ambientClassMergesOverloadsWithInterface.ts, 4, 13))
>foo : Symbol(C.foo, Decl(ambientClassMergesOverloadsWithInterface.ts, 1, 15), Decl(ambientClassMergesOverloadsWithInterface.ts, 4, 13))
>n : Symbol(n, Decl(ambientClassMergesOverloadsWithInterface.ts, 2, 8))
}
interface C {
>C : Symbol(C, Decl(ambientClassMergesOverloadsWithInterface.ts, 0, 0), Decl(ambientClassMergesOverloadsWithInterface.ts, 3, 1))
foo(n: number): any;
>foo : Symbol(foo, Decl(ambientClassMergesOverloadsWithInterface.ts, 1, 15), Decl(ambientClassMergesOverloadsWithInterface.ts, 4, 13))
>foo : Symbol(C.foo, Decl(ambientClassMergesOverloadsWithInterface.ts, 1, 15), Decl(ambientClassMergesOverloadsWithInterface.ts, 4, 13))
>n : Symbol(n, Decl(ambientClassMergesOverloadsWithInterface.ts, 5, 8))
bar(): any;
>bar : Symbol(bar, Decl(ambientClassMergesOverloadsWithInterface.ts, 5, 24))
>bar : Symbol(C.bar, Decl(ambientClassMergesOverloadsWithInterface.ts, 5, 24))
}
@@ -63,7 +63,7 @@ declare class cls {
constructor();
method(): cls;
>method : Symbol(method, Decl(ambientDeclarations.ts, 26, 18))
>method : Symbol(cls.method, Decl(ambientDeclarations.ts, 26, 18))
>cls : Symbol(cls, Decl(ambientDeclarations.ts, 22, 36))
static static(p): number;
@@ -74,7 +74,7 @@ declare class cls {
>q : Symbol(cls.q, Decl(ambientDeclarations.ts, 28, 29))
private fn();
>fn : Symbol(fn, Decl(ambientDeclarations.ts, 29, 13))
>fn : Symbol(cls.fn, Decl(ambientDeclarations.ts, 29, 13))
private static fns();
>fns : Symbol(cls.fns, Decl(ambientDeclarations.ts, 30, 17))
@@ -19,7 +19,7 @@ declare module 'M' {
>C : Symbol(C, Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 0, 20), Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 3, 5))
foo(): void;
>foo : Symbol(foo, Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 4, 13))
>foo : Symbol(C.foo, Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 4, 13))
}
import X = C;
>X : Symbol(X, Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 6, 5))
@@ -19,7 +19,7 @@ declare module 'M' {
>C : Symbol(C, Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 0, 20), Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 3, 5))
foo(): void;
>foo : Symbol(foo, Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 4, 13))
>foo : Symbol(C.foo, Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 4, 13))
}
export = C;
>C : Symbol(C, Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 0, 20), Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 3, 5))
@@ -3,35 +3,35 @@ class TestClass {
>TestClass : Symbol(TestClass, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 0, 0))
public bar(x: string): void;
>bar : Symbol(bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 0, 17), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 1, 32), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 2, 34))
>bar : Symbol(TestClass.bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 0, 17), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 1, 32), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 2, 34))
>x : Symbol(x, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 1, 15))
public bar(x: string[]): void;
>bar : Symbol(bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 0, 17), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 1, 32), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 2, 34))
>bar : Symbol(TestClass.bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 0, 17), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 1, 32), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 2, 34))
>x : Symbol(x, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 2, 15))
public bar(x: any): void {
>bar : Symbol(bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 0, 17), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 1, 32), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 2, 34))
>bar : Symbol(TestClass.bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 0, 17), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 1, 32), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 2, 34))
>x : Symbol(x, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 3, 15))
}
public foo(x: string): void;
>foo : Symbol(foo, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 5, 5), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 7, 32), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 8, 34))
>foo : Symbol(TestClass.foo, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 5, 5), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 7, 32), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 8, 34))
>x : Symbol(x, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 7, 15))
public foo(x: string[]): void;
>foo : Symbol(foo, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 5, 5), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 7, 32), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 8, 34))
>foo : Symbol(TestClass.foo, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 5, 5), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 7, 32), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 8, 34))
>x : Symbol(x, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 8, 15))
public foo(x: any): void {
>foo : Symbol(foo, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 5, 5), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 7, 32), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 8, 34))
>foo : Symbol(TestClass.foo, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 5, 5), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 7, 32), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 8, 34))
>x : Symbol(x, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 9, 15))
this.bar(x); // should not error
>this.bar : Symbol(bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 0, 17), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 1, 32), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 2, 34))
>this.bar : Symbol(TestClass.bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 0, 17), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 1, 32), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 2, 34))
>this : Symbol(TestClass, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 0, 0))
>bar : Symbol(bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 0, 17), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 1, 32), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 2, 34))
>bar : Symbol(TestClass.bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 0, 17), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 1, 32), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 2, 34))
>x : Symbol(x, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 9, 15))
}
}
@@ -40,36 +40,36 @@ class TestClass2 {
>TestClass2 : Symbol(TestClass2, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 12, 1))
public bar(x: string): number;
>bar : Symbol(bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 14, 18), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 15, 34), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 16, 36))
>bar : Symbol(TestClass2.bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 14, 18), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 15, 34), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 16, 36))
>x : Symbol(x, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 15, 15))
public bar(x: string[]): number;
>bar : Symbol(bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 14, 18), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 15, 34), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 16, 36))
>bar : Symbol(TestClass2.bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 14, 18), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 15, 34), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 16, 36))
>x : Symbol(x, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 16, 15))
public bar(x: any): number {
>bar : Symbol(bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 14, 18), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 15, 34), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 16, 36))
>bar : Symbol(TestClass2.bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 14, 18), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 15, 34), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 16, 36))
>x : Symbol(x, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 17, 15))
return 0;
}
public foo(x: string): number;
>foo : Symbol(foo, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 19, 5), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 21, 34), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 22, 36))
>foo : Symbol(TestClass2.foo, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 19, 5), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 21, 34), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 22, 36))
>x : Symbol(x, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 21, 15))
public foo(x: string[]): number;
>foo : Symbol(foo, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 19, 5), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 21, 34), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 22, 36))
>foo : Symbol(TestClass2.foo, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 19, 5), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 21, 34), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 22, 36))
>x : Symbol(x, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 22, 15))
public foo(x: any): number {
>foo : Symbol(foo, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 19, 5), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 21, 34), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 22, 36))
>foo : Symbol(TestClass2.foo, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 19, 5), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 21, 34), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 22, 36))
>x : Symbol(x, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 23, 15))
return this.bar(x); // should not error
>this.bar : Symbol(bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 14, 18), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 15, 34), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 16, 36))
>this.bar : Symbol(TestClass2.bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 14, 18), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 15, 34), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 16, 36))
>this : Symbol(TestClass2, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 12, 1))
>bar : Symbol(bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 14, 18), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 15, 34), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 16, 36))
>bar : Symbol(TestClass2.bar, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 14, 18), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 15, 34), Decl(ambiguousCallsWhereReturnTypesAgree.ts, 16, 36))
>x : Symbol(x, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 23, 15))
}
}
@@ -5,7 +5,7 @@ class A { }
class B extends A { x: number; }
>B : Symbol(B, Decl(ambiguousOverloadResolution.ts, 0, 11))
>A : Symbol(A, Decl(ambiguousOverloadResolution.ts, 0, 0))
>x : Symbol(x, Decl(ambiguousOverloadResolution.ts, 1, 19))
>x : Symbol(B.x, Decl(ambiguousOverloadResolution.ts, 1, 19))
declare function f(p: A, q: B): number;
>f : Symbol(f, Decl(ambiguousOverloadResolution.ts, 1, 32), Decl(ambiguousOverloadResolution.ts, 3, 39))
@@ -43,7 +43,7 @@ export class C1 {
>C1 : Symbol(C1, Decl(foo_0.ts, 0, 0))
m1 = 42;
>m1 : Symbol(m1, Decl(foo_0.ts, 0, 17))
>m1 : Symbol(C1.m1, Decl(foo_0.ts, 0, 17))
static s1 = true;
>s1 : Symbol(C1.s1, Decl(foo_0.ts, 1, 9))
@@ -53,10 +53,10 @@ export interface I1 {
>I1 : Symbol(I1, Decl(foo_0.ts, 3, 1))
name: string;
>name : Symbol(name, Decl(foo_0.ts, 5, 21))
>name : Symbol(I1.name, Decl(foo_0.ts, 5, 21))
age: number;
>age : Symbol(age, Decl(foo_0.ts, 6, 14))
>age : Symbol(I1.age, Decl(foo_0.ts, 6, 14))
}
export module M1 {
@@ -66,7 +66,7 @@ export module M1 {
>I2 : Symbol(I2, Decl(foo_0.ts, 10, 18))
foo: string;
>foo : Symbol(foo, Decl(foo_0.ts, 11, 22))
>foo : Symbol(I2.foo, Decl(foo_0.ts, 11, 22))
}
}
@@ -4,13 +4,13 @@ class Foo {
>Foo : Symbol(Foo, Decl(amdModuleName1.ts, 0, 0))
x: number;
>x : Symbol(x, Decl(amdModuleName1.ts, 1, 11))
>x : Symbol(Foo.x, Decl(amdModuleName1.ts, 1, 11))
constructor() {
this.x = 5;
>this.x : Symbol(x, Decl(amdModuleName1.ts, 1, 11))
>this.x : Symbol(Foo.x, Decl(amdModuleName1.ts, 1, 11))
>this : Symbol(Foo, Decl(amdModuleName1.ts, 0, 0))
>x : Symbol(x, Decl(amdModuleName1.ts, 1, 11))
>x : Symbol(Foo.x, Decl(amdModuleName1.ts, 1, 11))
}
}
export = Foo;
@@ -6,7 +6,7 @@ module M {
>C : Symbol(C, Decl(anonterface.ts, 0, 10))
m(fn:{ (n:number):string; },n2:number):string {
>m : Symbol(m, Decl(anonterface.ts, 1, 20))
>m : Symbol(C.m, Decl(anonterface.ts, 1, 20))
>fn : Symbol(fn, Decl(anonterface.ts, 2, 10))
>n : Symbol(n, Decl(anonterface.ts, 2, 16))
>n2 : Symbol(n2, Decl(anonterface.ts, 2, 36))
@@ -14,8 +14,8 @@ System.register([], function(exports_1, context_1) {
return {
setters:[],
execute: function() {
class default_1 {
}
default_1 = class {
};
exports_1("default", default_1);
}
}
@@ -8,7 +8,7 @@ interface I {
>x : Symbol(x, Decl(anyAssignabilityInInheritance.ts, 3, 5))
foo: any; // ok, any identical to itself
>foo : Symbol(foo, Decl(anyAssignabilityInInheritance.ts, 3, 21))
>foo : Symbol(I.foo, Decl(anyAssignabilityInInheritance.ts, 3, 21))
}
var a: any;
@@ -113,7 +113,7 @@ var r3 = foo3(a); // any
interface I8 { foo: string }
>I8 : Symbol(I8, Decl(anyAssignabilityInInheritance.ts, 35, 17))
>foo : Symbol(foo, Decl(anyAssignabilityInInheritance.ts, 37, 14))
>foo : Symbol(I8.foo, Decl(anyAssignabilityInInheritance.ts, 37, 14))
declare function foo9(x: I8): I8;
>foo9 : Symbol(foo9, Decl(anyAssignabilityInInheritance.ts, 37, 28), Decl(anyAssignabilityInInheritance.ts, 38, 33))
@@ -132,7 +132,7 @@ var r3 = foo3(a); // any
class A { foo: number; }
>A : Symbol(A, Decl(anyAssignabilityInInheritance.ts, 40, 17))
>foo : Symbol(foo, Decl(anyAssignabilityInInheritance.ts, 42, 9))
>foo : Symbol(A.foo, Decl(anyAssignabilityInInheritance.ts, 42, 9))
declare function foo10(x: A): A;
>foo10 : Symbol(foo10, Decl(anyAssignabilityInInheritance.ts, 42, 24), Decl(anyAssignabilityInInheritance.ts, 43, 32))
@@ -152,7 +152,7 @@ var r3 = foo3(a); // any
class A2<T> { foo: T; }
>A2 : Symbol(A2, Decl(anyAssignabilityInInheritance.ts, 45, 17))
>T : Symbol(T, Decl(anyAssignabilityInInheritance.ts, 47, 9))
>foo : Symbol(foo, Decl(anyAssignabilityInInheritance.ts, 47, 13))
>foo : Symbol(A2.foo, Decl(anyAssignabilityInInheritance.ts, 47, 13))
>T : Symbol(T, Decl(anyAssignabilityInInheritance.ts, 47, 9))
declare function foo11(x: A2<string>): A2<string>;
@@ -251,7 +251,7 @@ var r3 = foo3(a); // any
class CC { baz: string }
>CC : Symbol(CC, Decl(anyAssignabilityInInheritance.ts, 71, 17), Decl(anyAssignabilityInInheritance.ts, 73, 24))
>baz : Symbol(baz, Decl(anyAssignabilityInInheritance.ts, 73, 10))
>baz : Symbol(CC.baz, Decl(anyAssignabilityInInheritance.ts, 73, 10))
module CC {
>CC : Symbol(CC, Decl(anyAssignabilityInInheritance.ts, 71, 17), Decl(anyAssignabilityInInheritance.ts, 73, 24))
@@ -6,7 +6,7 @@ class C {
>C : Symbol(C, Decl(anyAssignableToEveryType.ts, 0, 11))
foo: string;
>foo : Symbol(foo, Decl(anyAssignableToEveryType.ts, 2, 9))
>foo : Symbol(C.foo, Decl(anyAssignableToEveryType.ts, 2, 9))
}
var ac: C;
>ac : Symbol(ac, Decl(anyAssignableToEveryType.ts, 5, 3))
@@ -16,7 +16,7 @@ interface I {
>I : Symbol(I, Decl(anyAssignableToEveryType.ts, 5, 10))
foo: string;
>foo : Symbol(foo, Decl(anyAssignableToEveryType.ts, 6, 13))
>foo : Symbol(I.foo, Decl(anyAssignableToEveryType.ts, 6, 13))
}
var ai: I;
>ai : Symbol(ai, Decl(anyAssignableToEveryType.ts, 9, 3))
@@ -8,7 +8,7 @@ interface I {
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 3, 5))
foo: any; // ok, any identical to itself
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 3, 21))
>foo : Symbol(I.foo, Decl(anyAssignableToEveryType2.ts, 3, 21))
}
@@ -19,7 +19,7 @@ interface I2 {
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 9, 5))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 9, 24))
>foo : Symbol(I2.foo, Decl(anyAssignableToEveryType2.ts, 9, 24))
}
@@ -30,7 +30,7 @@ interface I3 {
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 15, 5))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 15, 24))
>foo : Symbol(I3.foo, Decl(anyAssignableToEveryType2.ts, 15, 24))
}
@@ -41,7 +41,7 @@ interface I4 {
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 21, 5))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 21, 25))
>foo : Symbol(I4.foo, Decl(anyAssignableToEveryType2.ts, 21, 25))
}
@@ -53,7 +53,7 @@ interface I5 {
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 27, 22))
>foo : Symbol(I5.foo, Decl(anyAssignableToEveryType2.ts, 27, 22))
}
@@ -65,7 +65,7 @@ interface I6 {
>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 33, 24))
>foo : Symbol(I6.foo, Decl(anyAssignableToEveryType2.ts, 33, 24))
}
@@ -77,7 +77,7 @@ interface I7 {
>bar : Symbol(bar, Decl(anyAssignableToEveryType2.ts, 39, 18))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 39, 33))
>foo : Symbol(I7.foo, Decl(anyAssignableToEveryType2.ts, 39, 33))
}
@@ -88,7 +88,7 @@ interface I8 {
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 45, 5))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 45, 26))
>foo : Symbol(I8.foo, Decl(anyAssignableToEveryType2.ts, 45, 26))
}
@@ -100,12 +100,12 @@ interface I9 {
>I8 : Symbol(I8, Decl(anyAssignableToEveryType2.ts, 41, 1))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 51, 20))
>foo : Symbol(I9.foo, Decl(anyAssignableToEveryType2.ts, 51, 20))
}
class A { foo: number; }
>A : Symbol(A, Decl(anyAssignableToEveryType2.ts, 53, 1))
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 55, 9))
>foo : Symbol(A.foo, Decl(anyAssignableToEveryType2.ts, 55, 9))
interface I10 {
>I10 : Symbol(I10, Decl(anyAssignableToEveryType2.ts, 55, 24))
@@ -115,13 +115,13 @@ interface I10 {
>A : Symbol(A, Decl(anyAssignableToEveryType2.ts, 53, 1))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 57, 19))
>foo : Symbol(I10.foo, Decl(anyAssignableToEveryType2.ts, 57, 19))
}
class A2<T> { foo: T; }
>A2 : Symbol(A2, Decl(anyAssignableToEveryType2.ts, 59, 1))
>T : Symbol(T, Decl(anyAssignableToEveryType2.ts, 61, 9))
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 61, 13))
>foo : Symbol(A2.foo, Decl(anyAssignableToEveryType2.ts, 61, 13))
>T : Symbol(T, Decl(anyAssignableToEveryType2.ts, 61, 9))
interface I11 {
@@ -132,7 +132,7 @@ interface I11 {
>A2 : Symbol(A2, Decl(anyAssignableToEveryType2.ts, 59, 1))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 63, 28))
>foo : Symbol(I11.foo, Decl(anyAssignableToEveryType2.ts, 63, 28))
}
@@ -144,7 +144,7 @@ interface I12 {
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 69, 18))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 69, 31))
>foo : Symbol(I12.foo, Decl(anyAssignableToEveryType2.ts, 69, 31))
}
@@ -159,7 +159,7 @@ interface I13 {
>T : Symbol(T, Decl(anyAssignableToEveryType2.ts, 75, 18))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 75, 32))
>foo : Symbol(I13.foo, Decl(anyAssignableToEveryType2.ts, 75, 32))
}
@@ -175,7 +175,7 @@ interface I14 {
>E : Symbol(E, Decl(anyAssignableToEveryType2.ts, 77, 1))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 82, 19))
>foo : Symbol(I14.foo, Decl(anyAssignableToEveryType2.ts, 82, 19))
}
@@ -196,13 +196,13 @@ interface I15 {
>f : Symbol(f, Decl(anyAssignableToEveryType2.ts, 84, 1), Decl(anyAssignableToEveryType2.ts, 87, 16))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 92, 26))
>foo : Symbol(I15.foo, Decl(anyAssignableToEveryType2.ts, 92, 26))
}
class c { baz: string }
>c : Symbol(c, Decl(anyAssignableToEveryType2.ts, 94, 1), Decl(anyAssignableToEveryType2.ts, 97, 23))
>baz : Symbol(baz, Decl(anyAssignableToEveryType2.ts, 97, 9))
>baz : Symbol(c.baz, Decl(anyAssignableToEveryType2.ts, 97, 9))
module c {
>c : Symbol(c, Decl(anyAssignableToEveryType2.ts, 94, 1), Decl(anyAssignableToEveryType2.ts, 97, 23))
@@ -218,7 +218,7 @@ interface I16 {
>c : Symbol(c, Decl(anyAssignableToEveryType2.ts, 94, 1), Decl(anyAssignableToEveryType2.ts, 97, 23))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 102, 26))
>foo : Symbol(I16.foo, Decl(anyAssignableToEveryType2.ts, 102, 26))
}
@@ -231,7 +231,7 @@ interface I17<T> {
>T : Symbol(T, Decl(anyAssignableToEveryType2.ts, 107, 14))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 108, 19))
>foo : Symbol(I17.foo, Decl(anyAssignableToEveryType2.ts, 108, 19))
}
@@ -246,7 +246,7 @@ interface I18<T, U extends T> {
>U : Symbol(U, Decl(anyAssignableToEveryType2.ts, 113, 16))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 114, 19))
>foo : Symbol(I18.foo, Decl(anyAssignableToEveryType2.ts, 114, 19))
}
@@ -258,7 +258,7 @@ interface I19 {
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 120, 24))
>foo : Symbol(I19.foo, Decl(anyAssignableToEveryType2.ts, 120, 24))
}
@@ -269,6 +269,6 @@ interface I20 {
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 126, 5))
foo: any;
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 126, 20))
>foo : Symbol(I20.foo, Decl(anyAssignableToEveryType2.ts, 126, 20))
}
@@ -3,7 +3,7 @@ interface P {
>P : Symbol(P, Decl(anyIsAssignableToObject.ts, 0, 0))
p: {};
>p : Symbol(p, Decl(anyIsAssignableToObject.ts, 0, 13))
>p : Symbol(P.p, Decl(anyIsAssignableToObject.ts, 0, 13))
}
interface Q extends P { // Check assignability here. Any is assignable to {}
@@ -11,5 +11,5 @@ interface Q extends P { // Check assignability here. Any is assignable to {}
>P : Symbol(P, Decl(anyIsAssignableToObject.ts, 0, 0))
p: any;
>p : Symbol(p, Decl(anyIsAssignableToObject.ts, 4, 23))
>p : Symbol(Q.p, Decl(anyIsAssignableToObject.ts, 4, 23))
}
@@ -3,7 +3,7 @@ interface P {
>P : Symbol(P, Decl(anyIsAssignableToVoid.ts, 0, 0))
p: void;
>p : Symbol(p, Decl(anyIsAssignableToVoid.ts, 0, 13))
>p : Symbol(P.p, Decl(anyIsAssignableToVoid.ts, 0, 13))
}
interface Q extends P { // check assignability here. any is assignable to void.
@@ -11,5 +11,5 @@ interface Q extends P { // check assignability here. any is assignable to void.
>P : Symbol(P, Decl(anyIsAssignableToVoid.ts, 0, 0))
p: any;
>p : Symbol(p, Decl(anyIsAssignableToVoid.ts, 4, 23))
>p : Symbol(Q.p, Decl(anyIsAssignableToVoid.ts, 4, 23))
}
@@ -3,7 +3,7 @@ class C {
>C : Symbol(C, Decl(argsInScope.ts, 0, 0))
P(ii:number, j:number, k:number) {
>P : Symbol(P, Decl(argsInScope.ts, 0, 9))
>P : Symbol(C.P, Decl(argsInScope.ts, 0, 9))
>ii : Symbol(ii, Decl(argsInScope.ts, 1, 6))
>j : Symbol(j, Decl(argsInScope.ts, 1, 16))
>k : Symbol(k, Decl(argsInScope.ts, 1, 26))
@@ -9,24 +9,24 @@ module Test {
>IToken : Symbol(IToken, Decl(arrayAssignmentTest6.ts, 2, 5))
startIndex: number;
>startIndex : Symbol(startIndex, Decl(arrayAssignmentTest6.ts, 3, 22))
>startIndex : Symbol(IToken.startIndex, Decl(arrayAssignmentTest6.ts, 3, 22))
}
interface ILineTokens {
>ILineTokens : Symbol(ILineTokens, Decl(arrayAssignmentTest6.ts, 5, 5))
tokens: IToken[];
>tokens : Symbol(tokens, Decl(arrayAssignmentTest6.ts, 6, 27))
>tokens : Symbol(ILineTokens.tokens, Decl(arrayAssignmentTest6.ts, 6, 27))
>IToken : Symbol(IToken, Decl(arrayAssignmentTest6.ts, 2, 5))
endState: IState;
>endState : Symbol(endState, Decl(arrayAssignmentTest6.ts, 7, 25))
>endState : Symbol(ILineTokens.endState, Decl(arrayAssignmentTest6.ts, 7, 25))
>IState : Symbol(IState, Decl(arrayAssignmentTest6.ts, 0, 13))
}
interface IMode {
>IMode : Symbol(IMode, Decl(arrayAssignmentTest6.ts, 9, 5))
tokenize(line:string, state:IState, includeStates:boolean):ILineTokens;
>tokenize : Symbol(tokenize, Decl(arrayAssignmentTest6.ts, 10, 21))
>tokenize : Symbol(IMode.tokenize, Decl(arrayAssignmentTest6.ts, 10, 21))
>line : Symbol(line, Decl(arrayAssignmentTest6.ts, 11, 17))
>state : Symbol(state, Decl(arrayAssignmentTest6.ts, 11, 29))
>IState : Symbol(IState, Decl(arrayAssignmentTest6.ts, 0, 13))
@@ -38,7 +38,7 @@ module Test {
>IMode : Symbol(IMode, Decl(arrayAssignmentTest6.ts, 9, 5))
public tokenize(line:string, tokens:IToken[], includeStates:boolean):ILineTokens {
>tokenize : Symbol(tokenize, Decl(arrayAssignmentTest6.ts, 13, 39))
>tokenize : Symbol(Bug.tokenize, Decl(arrayAssignmentTest6.ts, 13, 39))
>line : Symbol(line, Decl(arrayAssignmentTest6.ts, 14, 24))
>tokens : Symbol(tokens, Decl(arrayAssignmentTest6.ts, 14, 36))
>IToken : Symbol(IToken, Decl(arrayAssignmentTest6.ts, 2, 5))
@@ -4,7 +4,7 @@ interface Array<T> {
>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(arrayAugment.ts, 0, 16))
split: (parts: number) => T[][];
>split : Symbol(split, Decl(arrayAugment.ts, 0, 20))
>split : Symbol(Array.split, Decl(arrayAugment.ts, 0, 20))
>parts : Symbol(parts, Decl(arrayAugment.ts, 1, 12))
>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(arrayAugment.ts, 0, 16))
}

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