@colyseus/schema 4.0.14 → 4.0.16

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.
@@ -271,9 +271,13 @@ function inspectNode(node, context, decoratorName) {
271
271
  break;
272
272
  case ts__namespace.SyntaxKind.PropertySignature:
273
273
  if (currentStructure instanceof Interface) {
274
- const interfaceDeclaration = node.parent;
275
- if (currentStructure.name !== interfaceDeclaration.name.escapedText.toString()) {
276
- // skip if property if for a another interface than the one we're interested in.
274
+ const parent = node.parent;
275
+ // Only process direct children of InterfaceDeclaration, skip TypeLiterals
276
+ if (!ts__namespace.isInterfaceDeclaration(parent)) {
277
+ break;
278
+ }
279
+ // Skip if property if for a another interface than the one we're interested in.
280
+ if (currentStructure.name !== parent.name.escapedText.toString()) {
277
281
  break;
278
282
  }
279
283
  // define a property of an interface