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 UnwrapMapStorageHelper extends UnwrapCopyStructHelper { } export class WrapMapStorageHelper extends WrapHelper { constructor() { super(...arguments); this.type = Types.MapStorage; } } export class IsMapStorageHelper extends IsHelper { constructor() { super(...arguments); this.type = Types.MapStorage; } } export const hasMapStorage = (context, node, type) => tsUtils.type_.hasType(type, (tpe) => isMapStorage(context, node, tpe)); export const isOnlyMapStorage = (context, node, type) => tsUtils.type_.isOnlyType(type, (tpe) => isMapStorage(context, node, tpe)); export const isMapStorage = (context, node, type) => context.builtins.isInterface(node, type, 'MapStorage'); //# sourceMappingURL=mapStorage.js.map