@colyseus/schema 1.0.25 → 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1190,6 +1190,9 @@ var globalContext = new Context();
1190
1190
  function type(type, context) {
1191
1191
  if (context === void 0) { context = globalContext; }
1192
1192
  return function (target, field) {
1193
+ if (!type) {
1194
+ throw new Error("Type not found. Ensure your `@type` annotations are correct and that you don't have any circular dependencies.");
1195
+ }
1193
1196
  var constructor = target.constructor;
1194
1197
  constructor._context = context;
1195
1198
  /*