UNPKG

@neo-one/smart-contract-compiler-esnext-esm

Version:

NEO•ONE TypeScript smart contract compiler.

25 lines (23 loc) 942 B
import { tsUtils } from '@neo-one/ts-utils-esnext-esm'; import { Types } from '../../constants'; import { IsHelper } from './IsHelper'; import { UnwrapHelper } from './UnwrapHelper'; import { WrapHelper } from './WrapHelper'; export class UnwrapHeaderHelper extends UnwrapHelper { } export class WrapHeaderHelper extends WrapHelper { constructor() { super(...arguments); this.type = Types.Header; } } export class IsHeaderHelper extends IsHelper { constructor() { super(...arguments); this.type = Types.Header; } } export const hasHeader = (context, node, type) => tsUtils.type_.hasType(type, (tpe) => isHeader(context, node, tpe)); export const isOnlyHeader = (context, node, type) => tsUtils.type_.isOnlyType(type, (tpe) => isHeader(context, node, tpe)); export const isHeader = (context, node, type) => context.builtins.isInterface(node, type, 'Header'); //# sourceMappingURL=header.js.map