From 6233c0aff0dc9e58b02dfc9499048385bbf836c6 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 23 Feb 2023 12:33:23 -0500 Subject: fix(npm): support bare specifiers in package.json having a path (#17903) For example `import * as test from "package/path.js"` --- cli/tests/testdata/npm/node_modules_import/main_check.out | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'cli/tests/testdata/npm/node_modules_import/main_check.out') diff --git a/cli/tests/testdata/npm/node_modules_import/main_check.out b/cli/tests/testdata/npm/node_modules_import/main_check.out index 4442a97ba..cf7cc110d 100644 --- a/cli/tests/testdata/npm/node_modules_import/main_check.out +++ b/cli/tests/testdata/npm/node_modules_import/main_check.out @@ -1,11 +1,16 @@ error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. const value1: string = myImport1.getValue(); ~~~~~~ - at file:///[WILDCARD]/npm/node_modules_import/main.ts:8:7 + at file:///[WILDCARD]/npm/node_modules_import/main.ts:9:7 TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. const value2: string = myImport2.getValue(); ~~~~~~ - at file:///[WILDCARD]/npm/node_modules_import/main.ts:9:7 + at file:///[WILDCARD]/npm/node_modules_import/main.ts:10:7 + +TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. +const value3: string = myImport3.getValue(); + ~~~~~~ + at file:///[WILDCARD]/npm/node_modules_import/main.ts:11:7 -Found 2 errors. +Found 3 errors. -- cgit v1.2.3