import * as ts from "typescript"; export declare function castArray(value: T | T[]): T[]; export declare function castArray(value: T | readonly T[]): readonly T[]; export declare const intersperse: (values: readonly T[], separator: T) => T[]; export declare const union: (...values: Array>) => T[]; export declare const intersection: (first: readonly T[], ...rest: Array) => T[]; type DiagnosticFactory = (...args: any) => Partial & Pick; export declare const createDiagnosticFactoryWithCode: (code: number, create: T) => ((...args: Parameters) => ts.Diagnostic) & { code: number; }; export declare const createSerialDiagnosticFactory: (create: T) => ((...args: Parameters) => ts.Diagnostic) & { code: number; }; export declare const normalizeSlashes: (filePath: string) => string; export declare const trimExtension: (filePath: string) => string; export declare function formatPathToLuaPath(filePath: string): string; type NoInfer = [T][T extends any ? 0 : never]; export declare function getOrUpdate(map: Map | (K extends object ? WeakMap : never), key: K, getDefaultValue: () => NoInfer): V; export declare function isNonNull(value: T | null | undefined): value is T; export declare function cast(item: TOriginal, cast: (item: TOriginal) => item is TCast): TCast; export declare function assert(value: any, message?: string | Error): asserts value; export declare function assertNever(_value: never): never; export declare function assume(_value: any): asserts _value is T; export {};