Comparing version 0.1.4 to 0.1.5
@@ -62,3 +62,3 @@ "use strict"; | ||
// Verify that "Bar" is a value (e.g. a constructor) and not just a type. | ||
var sym = this.typeChecker.getTypeAtLocation(param.type).getSymbol(); | ||
var sym = this.typeChecker.getSymbolAtLocation(param.type); | ||
if (sym && (sym.flags & ts.SymbolFlags.Value)) { | ||
@@ -65,0 +65,0 @@ paramCtor = new type_translator_1.TypeTranslator(this.typeChecker, param.type).symbolToString(sym); |
@@ -113,7 +113,8 @@ "use strict"; | ||
var sourceText; | ||
if (substituteSource.hasOwnProperty(fileName)) { | ||
sourceText = substituteSource[fileName]; | ||
return ts.createSourceFile(fileName, sourceText, languageVersion); | ||
var path = ts.sys.resolvePath(fileName); | ||
if (substituteSource.hasOwnProperty(path)) { | ||
sourceText = substituteSource[path]; | ||
return ts.createSourceFile(path, sourceText, languageVersion); | ||
} | ||
return delegate.getSourceFile(fileName, languageVersion, onError); | ||
return delegate.getSourceFile(path, languageVersion, onError); | ||
} | ||
@@ -149,3 +150,3 @@ } | ||
} | ||
tsickleOutput[fileName] = output; | ||
tsickleOutput[ts.sys.resolvePath(fileName)] = output; | ||
if (externs) { | ||
@@ -152,0 +153,0 @@ tsickleExterns += externs; |
{ | ||
"name": "tsickle", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Transpile TypeScript code to JavaScript with Closure annotations.", | ||
@@ -5,0 +5,0 @@ "main": "build/src/tsickle.js", |
@@ -60,3 +60,3 @@ import * as ts from 'typescript'; | ||
// Verify that "Bar" is a value (e.g. a constructor) and not just a type. | ||
let sym = this.typeChecker.getTypeAtLocation(param.type).getSymbol(); | ||
let sym = this.typeChecker.getSymbolAtLocation(param.type); | ||
if (sym && (sym.flags & ts.SymbolFlags.Value)) { | ||
@@ -63,0 +63,0 @@ paramCtor = new TypeTranslator(this.typeChecker, param.type).symbolToString(sym); |
@@ -146,7 +146,8 @@ import * as closure from 'google-closure-compiler'; | ||
let sourceText: string; | ||
if (substituteSource.hasOwnProperty(fileName)) { | ||
sourceText = substituteSource[fileName]; | ||
return ts.createSourceFile(fileName, sourceText, languageVersion); | ||
let path: string = ts.sys.resolvePath(fileName); | ||
if (substituteSource.hasOwnProperty(path)) { | ||
sourceText = substituteSource[path]; | ||
return ts.createSourceFile(path, sourceText, languageVersion); | ||
} | ||
return delegate.getSourceFile(fileName, languageVersion, onError); | ||
return delegate.getSourceFile(path, languageVersion, onError); | ||
} | ||
@@ -186,3 +187,3 @@ } | ||
} | ||
tsickleOutput[fileName] = output; | ||
tsickleOutput[ts.sys.resolvePath(fileName)] = output; | ||
if (externs) { | ||
@@ -189,0 +190,0 @@ tsickleExterns += externs; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
342545
7213