UNPKG

@neo-one/smart-contract-compiler

Version:

NEO•ONE TypeScript smart contract compiler.

19 lines (18 loc) 730 B
import ts from 'typescript'; import { Types } from '../../constants'; import { ScriptBuilder } from '../../sb'; import { VisitOptions } from '../../types'; import { Helper } from '../Helper'; export declare type PreferredType = 'default' | 'string' | 'number'; export interface ToPrimitiveHelperOptions { readonly type: ts.Type | undefined; readonly knownType?: Types; readonly preferredType?: PreferredType; } export declare class ToPrimitiveHelper extends Helper { private readonly type; private readonly knownType; private readonly preferredType; constructor({ type, knownType, preferredType }: ToPrimitiveHelperOptions); emit(sb: ScriptBuilder, node: ts.Node, optionsIn: VisitOptions): void; }