UNPKG

@backland/schema

Version:

TypeScript schema declaration and validation library with static type inference

29 lines (28 loc) 903 B
import { lazyCreateGraphTypeInitPayload } from './lazyCreateGraphTypeInitPayload'; // FIXME should fix deep instantiation types and remove `any's` export function initGraphType(self, args) { var _lazyCreateGraphTypeI = lazyCreateGraphTypeInitPayload(args, function (payload) { self.beforeInitialize.forEach(function (next) { payload = next(payload); }); self.touched = true; return payload; }), initializer = _lazyCreateGraphTypeI.initializer, idFromArgs = _lazyCreateGraphTypeI.idFromArgs; Object.defineProperty(self, '__lazyGetter', { get: function get() { return initializer(self); } }); Object.defineProperty(self, 'definition', { enumerable: true, get: function get() { return initializer(self).definition; } }); if (idFromArgs) { self.identify(idFromArgs); } } //# sourceMappingURL=initGraphType.js.map