fix(npm): dependency types were sometimes not being resolved when package had no types entry (#16958)

Closes #16957
This commit is contained in:
David Sherret 2022-12-05 20:09:31 -05:00 committed by GitHub
parent 79285fa83b
commit 3973ceb634
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 58 additions and 45 deletions

View file

@ -1 +1 @@
export function getValue(): 5;
export { getValue } from "@denotest/types-entry-value-not-exists";

View file

@ -1 +1 @@
module.exports.getValue = () => 5;
module.exports.getValue = require("@denotest/types-entry-value-not-exists").getValue;

View file

@ -1,5 +1,8 @@
{
"name": "@denotest/types-no-types-entry",
"version": "1.0.0",
"main": "./dist/main.js"
"main": "./dist/main.js",
"dependencies": {
"@denotest/types-entry-value-not-exists": "^1.0"
}
}

View file

@ -1,4 +1,6 @@
Download http://localhost:4545/npm/registry/@denotest/types-no-types-entry
Download http://localhost:4545/npm/registry/@denotest/types-entry-value-not-exists
Download http://localhost:4545/npm/registry/@denotest/types-entry-value-not-exists/1.0.0.tgz
Download http://localhost:4545/npm/registry/@denotest/types-no-types-entry/1.0.0.tgz
Check file://[WILDCARD]/types_no_types_entry/main.ts
error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'.