Skip to content

Commit 55e4843

Browse files
committed
fix(types): bad JSDoc type hint
1 parent 4235223 commit 55e4843

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

  • packages/database/src/core/modelClasses

packages/database/src/core/modelClasses/Entity.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,12 @@ export const ENTITY_RELATION_TYPE = /** @type {const} */ ({
125125
export class EntityRecord extends DatabaseRecord {
126126
static databaseRecord = RECORDS.ENTITY;
127127

128-
/** @type {EntityMetadata} */
129-
metadata;
130-
131-
/** @type {EntityTypeEnum} */
132-
type;
128+
/** @privateRemarks Does nothing meaningful runtime, but provides type hints to TypeScript */
129+
constructor(...args) {
130+
super(...args);
131+
/** @type {Entity['metadata']} */ this.metadata;
132+
/** @type {Entity['type']} */ this.type;
133+
}
133134

134135
// Exposed for access policy creation.
135136
get organisationUnitCode() {

0 commit comments

Comments
 (0)