UNPKG

openapi-to-ts

Version:

Generate TypeScript types from OpenAPI 3.0 specs.

7 lines (6 loc) 229 B
/** * Converts a string array to a TypeScript union type. * For example, ['A', 'B', 'C'] becomes 'A' | 'B' | 'C' * @param types the type array to convert. */ export declare const toTSUnion: (types: string[]) => string;