UNPKG

@clean-js/api-gen

Version:

[docs](https://lulusir.github.io/clean-js/api-gen/usage) [中文文档](https://github.com/lulusir/clean-js-api-gen/blob/main/README-zh.md)

11 lines (10 loc) 787 B
import { OpenAPIV3, OpenAPIV2 } from "openapi-types"; export declare function safeName(name: string): string; export declare function isOperationObjectMethod(method: string): method is OpenAPIV3.HttpMethods; export declare function isReferenceObjectV3(data: any): data is OpenAPIV3.ReferenceObject; export declare function isOperationObjectMethodV2(method: string): method is OpenAPIV2.HttpMethods; export type TsType = "number" | "string" | "boolean" | "object" | "null" | "array" | "undefined"; export declare function isSimpleType(schemaType: any): boolean; export declare const jsTypeMap: Record<string | "undefined", TsType>; export declare function schemaTypeToJsType(type?: string): TsType; export declare function urlToMethodName(url: string, mode?: "camel" | "pascal"): string;