Add tests for importing types from .d.ts with explicit extension (#53890)

This commit is contained in:
Mateusz Burzyński 2023-04-18 17:37:07 +02:00 committed by GitHub
parent 3d3b2c724e
commit e4f8c378c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}