From 3a9123fa5a7a7dd714051aa36487868500936774 Mon Sep 17 00:00:00 2001 From: cha0s Date: Mon, 11 Jan 2021 04:15:23 -0600 Subject: [PATCH] chore: better reflection --- packages/core/src/gather.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/gather.js b/packages/core/src/gather.js index dc54a83..518a529 100644 --- a/packages/core/src/gather.js +++ b/packages/core/src/gather.js @@ -11,7 +11,8 @@ export default (latus, type, idAttribute, typeAttribute, check = () => {}) => { Object.entries(composed) .sort(([lname], [rname]) => (lname < rname ? -1 : 1)) .map(([type, Class]) => { - const Subclass = class Idd extends Class {}; + // eslint-disable-next-line no-eval + const Subclass = eval(`(${type}) => class Gathered${type} extends ${type} {}`)(Class); const thisUid = uid++; fromId[thisUid] = Subclass; Subclass[idAttribute] = thisUid;