mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'master' into experimentalTransforms
This commit is contained in:
@@ -3,6 +3,14 @@ import { loadSourceFiles } from "./types";
|
||||
import { discover, DiscoveryResult } from "./discovery";
|
||||
import { combinePaths } from "./utilities";
|
||||
|
||||
declare var global: any, require: any;
|
||||
if (typeof global !== "undefined" && Object.prototype.toString.call(global.process) === '[object process]') {
|
||||
try {
|
||||
require("source-map-support").install();
|
||||
}
|
||||
catch (e) { }
|
||||
}
|
||||
|
||||
main();
|
||||
|
||||
function main() {
|
||||
|
||||
@@ -286,7 +286,7 @@ export abstract class TypeInfo implements Annotated {
|
||||
private getInheritedAnnotations() {
|
||||
if (!this.allAnnotations) {
|
||||
this.allAnnotations = [];
|
||||
let inheritedTypes = [this];
|
||||
let inheritedTypes = [this as TypeInfo];
|
||||
let seen: Map<boolean> = {};
|
||||
while (inheritedTypes.length > 0) {
|
||||
inheritedTypes = this.fillBreadthFirstInheritedAnnotations(inheritedTypes, seen);
|
||||
@@ -769,7 +769,7 @@ function getTypeInfoOfTypeNode(typeNode: ts.TypeNode): TypeInfo {
|
||||
return getTypeInfoOfArrayTypeNode(typeNode);
|
||||
}
|
||||
else {
|
||||
return getTypeInfoOfOtherType(typeNode.getText().trim());
|
||||
return getTypeInfoOfOtherType(typeNode ? typeNode.getText().trim() : "UNKNOWN_TYPE");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user