From 93111aa615ebc8b27526f6e899c7689ca365c9c0 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Fri, 30 Jan 2026 01:03:06 +0000 Subject: [PATCH] Add test files --- test/fixtures/test-types.ts | 52 +++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 test/fixtures/test-types.ts diff --git a/test/fixtures/test-types.ts b/test/fixtures/test-types.ts new file mode 100644 index 0000000..788af6d --- /dev/null +++ b/test/fixtures/test-types.ts @@ -0,0 +1,52 @@ +export interface User { + id: number; + name: string; + email: string; + createdAt: Date; +} + +export interface Admin extends User { + permissions: string[]; + role: 'admin' | 'superadmin'; +} + +export type UserId = number | string; + +export type AdminResponse = { + user: Admin; + token: string; +}; + +export type ApiResponse = { + data: T; + status: number; + message: string; +}; + +export interface Session { + id: string; + userId: UserId; + expiresAt: Date; +} + +export enum Status { + Pending = 'pending', + Active = 'active', + Inactive = 'inactive' +} + +export type ComplexType = { + nested: { + deep: { + value: string; + }; + }; + union: 'a' | 'b' | 'c' | 'd' | 'e' | 'f'; + intersection: User & { extra: string }; +}; + +export type ConditionalType = T extends string ? 'string' : T extends number ? 'number' : 'unknown'; + +export type DeepPartial = { + [P in keyof T]?: T[P] extends object ? DeepPartial : T[P]; +};