20 lines
386 B
TypeScript
20 lines
386 B
TypeScript
//// [tests/cases/compiler/moduleResolutionWithModule.ts] ////
|
|
|
|
//// [package.json]
|
|
{
|
|
"name": "pkg",
|
|
"version": "0.0.1",
|
|
"exports": "./entrypoint.js"
|
|
}
|
|
//// [entrypoint.d.ts]
|
|
export declare function thing(): void;
|
|
//// [index.ts]
|
|
import * as p from "pkg";
|
|
p.thing();
|
|
|
|
//// [index.js]
|
|
"use strict";
|
|
exports.__esModule = true;
|
|
var p = require("pkg");
|
|
p.thing();
|