(...args: ConstructorParameters<typeof BaseConstraint>)
| 283 | |
| 284 | export class StructureNode extends BaseConstraint<Structure.Declaration> { |
| 285 | constructor(...args: ConstructorParameters<typeof BaseConstraint>) { |
| 286 | super(...args) |
| 287 | // a set engine rejects duplicate keys in order with its other reduce errors |
| 288 | if (!$ark.sets) { |
| 289 | const seen: Record<Key, true | undefined> = Object.create(null) |
| 290 | for (const prop of this.props) { |
| 291 | if (prop.key in seen) |
| 292 | throwParseError(writeDuplicateKeyMessage(prop.key)) |
| 293 | seen[prop.key] = true |
| 294 | } |
| 295 | } |
| 296 | this.alters ||= this.structMorph !== undefined |
| 297 | } |
| 298 | |
| 299 | // JSON lists each kind of constraint and each prop's key in order |
| 300 | override sameInner(r: StructureNode): boolean | undefined { |
nothing calls this directly
no test coverage detected