Skip to content

Commit 18b8b63

Browse files
committed
Resolve re-exports when looking for tslib helpers
1 parent 8fae437 commit 18b8b63

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46998,7 +46998,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4699846998
if (requestedExternalEmitHelperNames.has(name)) continue;
4699946999
requestedExternalEmitHelperNames.add(name);
4700047000

47001-
const symbol = getSymbol(helpersModule.exports!, escapeLeadingUnderscores(name), SymbolFlags.Value);
47001+
const symbol = getSymbol(getExportsOfModule(helpersModule), escapeLeadingUnderscores(name), SymbolFlags.Value);
4700247002
if (!symbol) {
4700347003
error(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name);
4700447004
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// @module: nodenext
2+
// @experimentalDecorators: true
3+
// @importHelpers: true
4+
5+
// @Filename: /node_modules/tslib/index.d.ts
6+
export declare function __decorate(...args: any[]): any;
7+
8+
// @Filename: /node_modules/tslib/index.d.mts
9+
export * from "./index.js";
10+
11+
// @Filename: /node_modules/tslib/package.json
12+
{
13+
"name": "tslib",
14+
"version": "1.0.0",
15+
"types": "index.d.ts",
16+
"exports": {
17+
".": {
18+
"types": {
19+
"import": "./index.d.mts",
20+
"default": "./index.d.ts"
21+
}
22+
}
23+
}
24+
}
25+
26+
// @Filename: /index.mts
27+
declare var decorator: any;
28+
@decorator
29+
export class Foo {}

0 commit comments

Comments
 (0)