react-dts-generator
Version:
Simple .d.ts generator for React components.
12 lines (11 loc) • 553 B
TypeScript
import * as dom from './dts-dom';
import { Prop } from 'react-docgen';
export declare type PropResult = PropDeclaration | undefined;
export interface PropDeclaration {
property: dom.ObjectTypeMember;
interfaces?: dom.InterfaceDeclaration[];
}
export declare function getType(type: string): dom.Type;
export declare function generateProp(prop: Prop): PropResult;
export declare function writeGeneric(out: string, type: string): string;
export declare function createImport(from: string, defaultImport?: string, namedImport?: string): dom.Import;