@neo-one/smart-contract-compiler-esnext-esm
Version:
NEO•ONE TypeScript smart contract compiler.
25 lines (23 loc) • 965 B
JavaScript
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 UnwrapSetHelper extends UnwrapHelper {
}
export class WrapSetHelper extends WrapHelper {
constructor() {
super(...arguments);
this.type = Types.Set;
}
}
export class IsSetHelper extends IsHelper {
constructor() {
super(...arguments);
this.type = Types.Set;
}
}
export const hasSet = (context, node, type) => tsUtils.type_.hasType(type, (tpe) => isSet(context, node, tpe));
export const isOnlySet = (context, node, type) => tsUtils.type_.isOnlyType(type, (tpe) => isSet(context, node, tpe));
export const isSet = (context, node, type) => context.builtins.isInterface(node, type, 'Set') || context.builtins.isInterface(node, type, 'ReadonlySet');
//# sourceMappingURL=set.js.map