chore: better reflection
This commit is contained in:
parent
300d7e85bd
commit
3a9123fa5a
|
@ -11,7 +11,8 @@ export default (latus, type, idAttribute, typeAttribute, check = () => {}) => {
|
||||||
Object.entries(composed)
|
Object.entries(composed)
|
||||||
.sort(([lname], [rname]) => (lname < rname ? -1 : 1))
|
.sort(([lname], [rname]) => (lname < rname ? -1 : 1))
|
||||||
.map(([type, Class]) => {
|
.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++;
|
const thisUid = uid++;
|
||||||
fromId[thisUid] = Subclass;
|
fromId[thisUid] = Subclass;
|
||||||
Subclass[idAttribute] = thisUid;
|
Subclass[idAttribute] = thisUid;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user