UNPKG

@neo-one/smart-contract-compiler

Version:

NEO•ONE TypeScript smart contract compiler.

32 lines (31 loc) 1.23 kB
import ts from 'typescript'; import { ScriptBuilder } from '../../sb'; import { VisitOptions } from '../../types'; import { Helper } from '../Helper'; declare type Process = (options: VisitOptions) => void; export interface ForType { readonly hasType: (type: ts.Type) => boolean; readonly isRuntimeType: (options: VisitOptions) => void; readonly process: Process; } export interface ForTypeHelperOptions { readonly type: ts.Type | undefined; readonly types: ReadonlyArray<ForType>; readonly single?: boolean; readonly singleUndefined?: (options: VisitOptions) => void; readonly singleFalse?: (options: VisitOptions) => void; readonly optional?: boolean; readonly defaultCase?: (options: VisitOptions) => void; } export declare class ForTypeHelper extends Helper { private readonly type; private readonly types; private readonly single; private readonly singleUndefined; private readonly singleFalse; private readonly optional; private readonly defaultCase; constructor({ type, types, single, singleUndefined, singleFalse, defaultCase, optional, }: ForTypeHelperOptions); emit(sb: ScriptBuilder, node: ts.Node, optionsIn: VisitOptions): void; } export {};