mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
fix(npm/types): resolve main entrypoint declaration file when no types entry (#16791)
Closes #16782
This commit is contained in:
parent
fd023cf793
commit
823a5f6015
7 changed files with 43 additions and 13 deletions
1
cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/dist/main.d.ts
vendored
Normal file
1
cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/dist/main.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export function getValue(): 5;
|
1
cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/dist/main.js
vendored
Normal file
1
cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/dist/main.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
module.exports.getValue = () => 5;
|
5
cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/package.json
vendored
Normal file
5
cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/package.json
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"name": "@denotest/types-no-types-entry",
|
||||
"version": "1.0.0",
|
||||
"main": "./dist/main.js"
|
||||
}
|
4
cli/tests/testdata/npm/types_no_types_entry/main.out
vendored
Normal file
4
cli/tests/testdata/npm/types_no_types_entry/main.out
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
Download http://localhost:4545/npm/registry/@denotest/types-no-types-entry
|
||||
Download http://localhost:4545/npm/registry/@denotest/types-no-types-entry/1.0.0.tgz
|
||||
Check file://[WILDCARD]/types_no_types_entry/main.ts
|
||||
5
|
4
cli/tests/testdata/npm/types_no_types_entry/main.ts
vendored
Normal file
4
cli/tests/testdata/npm/types_no_types_entry/main.ts
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
import { getValue } from "npm:@denotest/types-no-types-entry";
|
||||
|
||||
const result: 5 = getValue();
|
||||
console.log(result);
|
Loading…
Add table
Add a link
Reference in a new issue