UNPKG

stable-ts-type

Version:

Obtain the most stable type code of 'typescript' through multiple network requests

22 lines (21 loc) 835 B
import type { Options } from 'quicktype-core'; interface QuickTypeOpts extends Partial<Omit<Options, 'rendererOptions'>> { rendererOptions?: RendererOptions; } /** 传入的参数 */ export declare type TypeOpts = Omit<QuickTypeOpts, 'inputData' | 'lang'>; export interface RendererOptions { /** 只生成类型 */ 'just-types'?: 'true' | 'false'; /** 更任性的属性名, 比如postId -> postID */ 'nice-property-names'?: 'true' | 'false'; /** 是否要把 unions 抽出来成为一个单独的类型 */ 'explicit-unions'?: 'true' | 'false'; /** 使用 unions 或 enum */ 'prefer-unions'?: 'true' | 'false'; /** 使用 types 或 interface */ 'prefer-types'?: 'true' | 'false'; } export declare const renderOpts: RendererOptions; export declare const defaultTypeOpts: TypeOpts; export {};