TypeScript/tests/baselines/reference/referenceTypesPreferedToPathIfPossible.js
Ron Buckton 711b4e778b
Indirect calls for imported functions (#44624)
* Indirect calls for imported functions

* Fix unit tests
2021-06-21 19:51:13 -07:00

25 lines
572 B
TypeScript

//// [tests/cases/compiler/referenceTypesPreferedToPathIfPossible.ts] ////
//// [index.d.ts]
declare module "url" {
export class Url {}
export function parse(): Url;
}
//// [usage.ts]
import { parse } from "url";
export const thing = () => parse();
//// [usage.js]
"use strict";
exports.__esModule = true;
exports.thing = void 0;
var url_1 = require("url");
var thing = function () { return (0, url_1.parse)(); };
exports.thing = thing;
//// [usage.d.ts]
/// <reference types="node" />
export declare const thing: () => import("url").Url;