CR feedback

This commit is contained in:
Ryan Cavanaugh
2015-10-22 15:39:01 -07:00
parent abf270a9b4
commit 91eb758d59
2 changed files with 3 additions and 11 deletions
+2 -10
View File
@@ -160,8 +160,6 @@ namespace ts {
let getGlobalPromiseConstructorLikeType: () => ObjectType;
let getGlobalThenableType: () => ObjectType;
let cjsRequireType: Type;
let tupleTypes: Map<TupleType> = {};
let unionTypes: Map<UnionType> = {};
let intersectionTypes: Map<IntersectionType> = {};
@@ -4203,13 +4201,9 @@ namespace ts {
* getExportedTypeFromNamespace('JSX', 'Element') returns the JSX.Element type
*/
function getExportedTypeFromNamespace(namespace: string, name: string): Type {
let typeSymbol = getExportedSymbolFromNamespace(namespace, name);
return typeSymbol && getDeclaredTypeOfSymbol(typeSymbol);
}
function getExportedSymbolFromNamespace(namespace: string, name: string): Symbol {
let namespaceSymbol = getGlobalSymbol(namespace, SymbolFlags.Namespace, /*diagnosticMessage*/ undefined);
return namespaceSymbol && getSymbol(namespaceSymbol.exports, name, SymbolFlags.Type | SymbolFlags.Value);
let typeSymbol = namespaceSymbol && getSymbol(namespaceSymbol.exports, name, SymbolFlags.Type);
return typeSymbol && getDeclaredTypeOfSymbol(typeSymbol);
}
function getGlobalESSymbolConstructorSymbol() {
@@ -14938,8 +14932,6 @@ namespace ts {
getGlobalPromiseConstructorLikeType = memoize(() => getGlobalType("PromiseConstructorLike"));
getGlobalThenableType = memoize(createThenableType);
cjsRequireType = getExportedTypeFromNamespace("CommonJS", "Require");
// If we're in ES6 mode, load the TemplateStringsArray.
// Otherwise, default to 'unknown' for the purposes of type checking in LS scenarios.
if (languageVersion >= ScriptTarget.ES6) {
+1 -1
View File
@@ -211,7 +211,7 @@ namespace Utils {
return isNodeOrArray(v) ? serializeNode(v) : v;
}, " ");
function getKindName(k: number|string): string {
function getKindName(k: number | string): string {
if (typeof k === "string") {
return k;
}