UNPKG

openapi-to-ts

Version:

Generate TypeScript types from OpenAPI 3.0 specs.

10 lines (9 loc) 481 B
import { IOpenAPISchemaObject } from '../types'; /** * Checks based on an OpenAPI 3.0 schema object if we should generate * a TypeScript interface or type. Generally we generate interfaces, * however in certain edge cases we need to generate a type instead. * This is done to avoid generating empty interfaces. * @param schemaObject the schema object to check. */ export declare const getGenerationGoal: (schemaObject: IOpenAPISchemaObject) => 'INTERFACE' | 'TYPE';