UNPKG

@tryloop/oats

Version:

🌾 OATS - OpenAPI TypeScript Sync. The missing link between your OpenAPI specs and TypeScript applications. Automatically watch, generate, and sync TypeScript clients from your API definitions.

46 lines • 1.38 kB
/// <reference types="node" /> export interface PlatformConfig { fileWatcherDebounce: number; portCleanupWait: number; processTermSignal: NodeJS.Signals; useShell: boolean; } export declare class PlatformUtils { static readonly isWindows: boolean; static readonly isMac: boolean; static readonly isLinux: boolean; static getConfig(): PlatformConfig; /** * Touch a file to trigger HMR (cross-platform) */ static touchFile(filePath: string): Promise<void>; /** * Kill a process (cross-platform) */ static killProcess(pid: number, signal?: NodeJS.Signals): Promise<void>; /** * Wait for port cleanup (platform-specific timing) */ static waitForPortCleanup(): Promise<void>; /** * Get file watcher debounce time */ static getFileWatcherDebounce(): number; /** * Normalize path for the current platform */ static normalizePath(filePath: string): string; /** * Check if running with elevated privileges */ static hasElevatedPrivileges(): Promise<boolean>; /** * Get npm/yarn executable with proper extension */ static getNpmExecutable(pm: 'npm' | 'yarn' | 'pnpm'): string; /** * Get debug info for platform-specific issues */ static getDebugInfo(): Record<string, any>; } //# sourceMappingURL=platform.d.ts.map