fix(npm/types): resolve main entrypoint declaration file when no types entry (#16791)

Closes #16782
This commit is contained in:
David Sherret 2022-11-24 13:13:51 -05:00 committed by GitHub
parent fd023cf793
commit 823a5f6015
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 43 additions and 13 deletions

View file

@ -0,0 +1 @@
export function getValue(): 5;

View file

@ -0,0 +1 @@
module.exports.getValue = () => 5;

View file

@ -0,0 +1,5 @@
{
"name": "@denotest/types-no-types-entry",
"version": "1.0.0",
"main": "./dist/main.js"
}

View 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

View file

@ -0,0 +1,4 @@
import { getValue } from "npm:@denotest/types-no-types-entry";
const result: 5 = getValue();
console.log(result);