UNPKG

@sudoo/marked

Version:

JavaScript & TypeScript code runner in JavaScript, safe with marked territory, asynchronous

30 lines (29 loc) 1.12 kB
"use strict"; /** * @author WMXPY * @namespace Variable_NativeClass * @description Native Class */ Object.defineProperty(exports, "__esModule", { value: true }); exports.MarkedNativeClass = void 0; const declare_1 = require("./declare"); class MarkedNativeClass { static create(constructorMethod, getStaticMemberFunction = declare_1.defaultMarkedNativeClassGetStaticMemberFunction, toNativeFunction = declare_1.defaultMarkedNativeClassToNativeFunction) { return new MarkedNativeClass(constructorMethod, getStaticMemberFunction, toNativeFunction); } constructor(constructorMethod, getStaticMemberFunction, toNativeFunction) { this._constructorMethod = constructorMethod; this._getStaticMemberFunction = getStaticMemberFunction; this._toNativeFunction = toNativeFunction; } get constructorMethod() { return this._constructorMethod; } getStaticMember(name, sandbox) { return this._getStaticMemberFunction(name, sandbox); } toNative() { return this._toNativeFunction(); } } exports.MarkedNativeClass = MarkedNativeClass;