UNPKG

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

Version:

NEO•ONE TypeScript smart contract compiler.

25 lines (23 loc) 1.02 kB
import { tsUtils } from '@neo-one/ts-utils-esnext-esm'; import { Types } from '../../constants'; import { IsHelper } from './IsHelper'; import { UnwrapCopyStructHelper } from './UnwrapCopyStructHelper'; import { WrapHelper } from './WrapHelper'; export class UnwrapSetStorageHelper extends UnwrapCopyStructHelper { } export class WrapSetStorageHelper extends WrapHelper { constructor() { super(...arguments); this.type = Types.SetStorage; } } export class IsSetStorageHelper extends IsHelper { constructor() { super(...arguments); this.type = Types.SetStorage; } } export const hasSetStorage = (context, node, type) => tsUtils.type_.hasType(type, (tpe) => isSetStorage(context, node, tpe)); export const isOnlySetStorage = (context, node, type) => tsUtils.type_.isOnlyType(type, (tpe) => isSetStorage(context, node, tpe)); export const isSetStorage = (context, node, type) => context.builtins.isInterface(node, type, 'SetStorage'); //# sourceMappingURL=setStorage.js.map