Skip to content

Commit

Permalink
Add tests for importing types from .d.ts with explicit extension (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Apr 18, 2023
1 parent 3d3b2c7 commit e4f8c37
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit e4f8c37

Please sign in to comment.