UNPKG

@microsoft/api-extractor

Version:

Validate, document, and review the exported API for a TypeScript library

31 lines (30 loc) 1.2 kB
import { AstItemKind } from '../ast/AstItem'; /** * Supports the conversion between AstItems that are loaded from AstItem to JSON notation * and vice versa. */ export declare class ApiJsonConverter { private static _KIND_CONSTRUCTOR; private static _KIND_CLASS; private static _KIND_ENUM; private static _KIND_ENUM_VALUE; private static _KIND_INTERFACE; private static _KIND_FUNCTION; private static _KIND_PACKAGE; private static _KIND_PROPERTY; private static _KIND_METHOD; private static _KIND_NAMESPACE; private static _KIND_MODULEVARIABLE; /** * Uses the lowercase string that represents 'kind' in an API JSON file, and * converts it to an AstItemKind enum value. * There are two cases we do not include here, (Parameter and StructuredType), * this is intential as we do not expect to be loading these kind of JSON object * from file. */ static convertJsonToKind(jsonItemKind: string): AstItemKind; /** * Converts the an AstItemKind into a lower-case string that is written to API JSON files. */ static convertKindToJson(astItemKind: AstItemKind): string; }