UNPKG

type-compiler

Version:

A TypeScript compiler plugin for enhanced runtime type checking and analysis with Zod validation

37 lines (36 loc) 941 B
/** * Self-test file for the type-compiler plugin * * This file contains types specifically designed to test whether * the plugin is working correctly when applied to its own code. */ /** * A simple test interface with common property types */ export interface TestUser { id: number; name: string; email: string; isActive: boolean; createdAt: Date; roles: string[]; metadata?: Record<string, unknown>; } /** * A simple type alias */ export type UserRole = 'admin' | 'editor' | 'viewer'; /** * A class with methods for testing class validation */ export declare class UserService { private apiKey; private timeout; constructor(apiKey: string, timeout?: number); getUser(id: number): Promise<TestUser | null>; updateUser(id: number, data: Partial<TestUser>): boolean; } /** * Check if the Zod schemas were generated correctly */ export declare function validateSelfTest(): boolean;