@cosmology/ast
Version:
Cosmos TypeScript AST generation
21 lines (20 loc) • 1.59 kB
TypeScript
import * as t from "@babel/types";
import { ProtoField } from "@cosmology/types";
import { ProtoParseContext } from "../encoding";
declare const BILLION: t.NumericLiteral;
export { BILLION };
export declare const cleanComment: (str: any) => any;
export declare const makeCommentBlock: (comment: string) => t.CommentBlock;
export declare const renderNameSafely: (name: any) => any;
export declare const getProtoFieldTypeName: (context: ProtoParseContext, field: ProtoField) => any;
export declare const recursiveNamespace: (names: any, moduleBlockBody: any) => any;
export declare const bindMethod: (name: string) => t.ExpressionStatement;
export declare const shorthandProperty: (prop: string) => t.ObjectProperty;
export declare const importStmt: (names: string[], path: string) => t.ImportDeclaration;
export declare const memberExpressionOrIdentifier: (names: any) => any;
export declare const memberExpressionOrIdentifierAminoCasing: (names: any, aminoCasingFn: Function) => any;
export declare const memberExpressionOrIdentifierAminoCaseField: (fields: ProtoField[], aminoCaseFunc: Function, useNullHandling?: boolean) => any;
export declare const promiseTypeAnnotation: (name: any) => t.TSTypeAnnotation;
export declare const getAcceptedInterfacesTypes: (context: ProtoParseContext, lookupInterface: string) => import("@cosmology/types").TraversalSymbol[];
export declare const getSdkFieldName: (fieldName: string, field: ProtoField) => string;
export declare const getAminoFieldName: (fieldName: string, field: ProtoField, interfaceName: string, context: ProtoParseContext) => string;