Fix 8355: Fix emit metadata different between transpile and tsc --isolatedModule (#9232)

* Instead of returning undefined for unknownSymbol return itself

* Add Transpile unittest

* Wip - Add project tests

* Add project tests and baselines

* Update existed tests

* Add tests for emitting metadata with module targetting system
This commit is contained in:
Yui
2016-06-24 17:39:49 -07:00
committed by GitHub
parent fb3f823dde
commit e182ecf2c9
50 changed files with 746 additions and 2 deletions

View File

@@ -1265,9 +1265,13 @@ namespace ts {
const right = name.kind === SyntaxKind.QualifiedName ? (<QualifiedName>name).right : (<PropertyAccessExpression>name).name;
const namespace = resolveEntityName(left, SymbolFlags.Namespace, ignoreErrors);
if (!namespace || namespace === unknownSymbol || nodeIsMissing(right)) {
if (!namespace || nodeIsMissing(right)) {
return undefined;
}
else if (namespace === unknownSymbol) {
return namespace;
}
symbol = getSymbol(getExportsOfSymbol(namespace), right.text, meaning);
if (!symbol) {
if (!ignoreErrors) {