ts-const-value-transformer 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/transform.mjs +5 -1
- package/dist/version.d.mts +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/transform.mjs
CHANGED
|
@@ -146,7 +146,11 @@ function isExternalReference(node, program) {
|
|
|
146
146
|
}
|
|
147
147
|
const baseName = nodeFrom.propertyName ?? nodeFrom.name;
|
|
148
148
|
const baseSym = typeChecker.getSymbolAtLocation(baseName);
|
|
149
|
-
|
|
149
|
+
// We must follow 'aliased' symbol for parsing the symbol which name is not changed from the exported symbol name
|
|
150
|
+
const exportedSym = baseSym && baseSym.getFlags() & ts.SymbolFlags.Alias
|
|
151
|
+
? typeChecker.getAliasedSymbol(baseSym)
|
|
152
|
+
: baseSym;
|
|
153
|
+
nodeFrom = exportedSym?.getDeclarations()?.[0];
|
|
150
154
|
}
|
|
151
155
|
const type = typeChecker.getTypeAtLocation(node);
|
|
152
156
|
const sym = type.getSymbol();
|
package/dist/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.2.
|
|
1
|
+
declare const _default: "0.2.1";
|
|
2
2
|
export default _default;
|
package/dist/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '0.2.
|
|
1
|
+
export default '0.2.1';
|