Errors

01

Missing samples in iterable. In order to let JTC know which values are valid for the iterables, you should push at least one sample to each iterable.

Wrong

new ArrayMeta([] as any);
new MapMeta([] as any);
new ArrayMeta([new NumberField()]);
new MapMeta([new NumberField()]);

02

builder must create custom classes, not JS native

Wrong

new ObjectMeta({ builder: Number, fields: {} });

Right

class User {
   public id: string;
}

const USER_META = new ObjectMeta({
   builder: User,
   fields: {
      id: new StringField()
   }
});

03

Second attempt to define meta (new ObjectMeta) with already used builder

Wrong

Right

04

Iterable can have only one inner iterable entry

Wrong

Right

05

Meta for the parrent class should be created before creating meta for the child class

Wrong

Right

06

Can't get meta from such value

JTC.getMeta will work only with instances which constructor was used during new ObjectMeta call. In all other cases error will be thrown.

Wrong

Right

Last updated