Skip to content

Commit 3469b62

Browse files
committed
review comments
1 parent ec1ff29 commit 3469b62

File tree

4 files changed

+9
-39
lines changed

4 files changed

+9
-39
lines changed

src/testRunner/unittests/moduleResolution.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -337,13 +337,11 @@ namespace ts {
337337
const compilerOptions: CompilerOptions = { moduleResolution: ModuleResolutionKind.NodeJs };
338338
const cache = createModuleResolutionCache("/", (f) => f);
339339
let resolution = resolveModuleName("a", "/sub/dir/foo.ts", compilerOptions, host, cache);
340-
checkResolvedModule(resolution.resolvedModule, {
341-
extension: Extension.Ts,
342-
isExternalLibraryImport: true,
343-
originalPath: "/sub/node_modules/a/index.ts",
344-
packageId: undefined,
345-
resolvedFileName: "/modules/a.ts",
346-
});
340+
checkResolvedModule(resolution.resolvedModule, createResolvedModule("/modules/a.ts", /*isExternalLibraryImport*/ true));
341+
342+
resolution = resolveModuleName("a", "/sub/foo.ts", compilerOptions, host, cache);
343+
checkResolvedModule(resolution.resolvedModule, createResolvedModule("/modules/a.ts", /*isExternalLibraryImport*/ true));
344+
347345
resolution = resolveModuleName("a", "/foo.ts", compilerOptions, host, cache);
348346
assert.isUndefined(resolution.resolvedModule, "lookup in parent directory doesn't hit the cache");
349347
});

tests/baselines/reference/symbolLinkDeclarationEmitModuleNames.errors.txt

Lines changed: 0 additions & 28 deletions
This file was deleted.

tests/baselines/reference/symbolLinkDeclarationEmitModuleNames.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import { BindingKey } from '@loopback/context';
1515
export const CONTROLLER_CLASS = BindingKey.create<ControllerClass>(null as any); // line in question
1616
>CONTROLLER_CLASS : BindingKey<import("tests/cases/compiler/monorepo/context/src/value-promise").Constructor<any>>
1717
>BindingKey.create<ControllerClass>(null as any) : BindingKey<import("tests/cases/compiler/monorepo/context/src/value-promise").Constructor<any>>
18-
>BindingKey.create : <T extends any>(ctor: T) => BindingKey<T>
18+
>BindingKey.create : <T extends import("tests/cases/compiler/monorepo/context/src/value-promise").Constructor<any>>(ctor: T) => BindingKey<T>
1919
>BindingKey : typeof BindingKey
20-
>create : <T extends any>(ctor: T) => BindingKey<T>
20+
>create : <T extends import("tests/cases/compiler/monorepo/context/src/value-promise").Constructor<any>>(ctor: T) => BindingKey<T>
2121
>null as any : any
2222
>null : null
2323

@@ -37,7 +37,7 @@ export class BindingKey<T> {
3737
>__type : T
3838

3939
static create<T extends Constructor<any>>(ctor: T) {
40-
>create : <T extends any>(ctor: T) => BindingKey<T>
40+
>create : <T extends Constructor<any>>(ctor: T) => BindingKey<T>
4141
>ctor : T
4242

4343
return new BindingKey<T>();

tests/cases/compiler/symbolLinkDeclarationEmitModuleNames.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ export class BindingKey<T> {
2222
export * from "./src/value-promise";
2323
export * from "./src/bindingkey";
2424

25-
// @link: tests/cases/compiler/monorepo/context -> tests/cases/compiler/monorepo/core/node_modules/@loopback/context
25+
// @link: tests/cases/compiler/monorepo/context -> tests/cases/compiler/monorepo/node_modules/@loopback/context

0 commit comments

Comments
 (0)