mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Add tests for importing types from .d.ts with explicit extension (#53890)
This commit is contained in:
parent
3d3b2c724e
commit
e4f8c378c0
@ -0,0 +1,19 @@
|
||||
// @allowImportingTsExtensions: true,false
|
||||
// @noEmit: true
|
||||
// @moduleResolution: classic,node10,node16,nodenext
|
||||
// @noTypesAndSymbols: true
|
||||
|
||||
// @Filename: /types.d.ts
|
||||
export declare type User = {
|
||||
name: string;
|
||||
}
|
||||
|
||||
// @Filename: /a.ts
|
||||
import type { User } from "./types.d.ts";
|
||||
export type { User } from "./types.d.ts";
|
||||
|
||||
export const user: User = { name: "John" };
|
||||
|
||||
export function getUser(): import("./types.d.ts").User {
|
||||
return user;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user