Skip to content

Commit 6874576

Browse files
committed
chore: types
1 parent 79e2e78 commit 6874576

File tree

3 files changed

+58
-16
lines changed

3 files changed

+58
-16
lines changed

dist/js/entity/other.d.ts

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
11
import { InMemoryEntity } from "./in_memory";
2-
export declare class DefaultableInMemoryEntity extends InMemoryEntity {
2+
import { type DefaultableInMemoryEntityConstructor } from "./mixins/DefaultableMixin";
3+
import { type HasConsistencyChecksInMemoryEntityConstructor } from "./mixins/HasConsistencyChecksMixin";
4+
import { type HasMetadataInMemoryEntityConstructor } from "./mixins/HasMetadataMixin";
5+
import { type NamedInMemoryEntityConstructor } from "./mixins/NamedEntityMixin";
6+
type DefaultableBase = typeof InMemoryEntity & DefaultableInMemoryEntityConstructor;
7+
type NamedBase = typeof InMemoryEntity & NamedInMemoryEntityConstructor;
8+
type NamedDefaultableBase = typeof InMemoryEntity & DefaultableInMemoryEntityConstructor & NamedInMemoryEntityConstructor;
9+
type HasMetadataNamedDefaultableBase = typeof InMemoryEntity & DefaultableInMemoryEntityConstructor & NamedInMemoryEntityConstructor & HasMetadataInMemoryEntityConstructor;
10+
type HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntityBase = typeof HasMetadataNamedDefaultableInMemoryEntity & HasConsistencyChecksInMemoryEntityConstructor;
11+
declare const DefaultableInMemoryEntity_base: DefaultableBase;
12+
export declare class DefaultableInMemoryEntity extends DefaultableInMemoryEntity_base {
313
}
4-
export declare class NamedInMemoryEntity extends InMemoryEntity {
14+
declare const NamedInMemoryEntity_base: NamedBase;
15+
export declare class NamedInMemoryEntity extends NamedInMemoryEntity_base {
516
}
6-
export declare class NamedDefaultableInMemoryEntity extends DefaultableInMemoryEntity {
17+
declare const NamedDefaultableInMemoryEntity_base: NamedDefaultableBase;
18+
export declare class NamedDefaultableInMemoryEntity extends NamedDefaultableInMemoryEntity_base {
719
}
8-
export declare class HasMetadataNamedDefaultableInMemoryEntity extends NamedDefaultableInMemoryEntity {
20+
declare const HasMetadataNamedDefaultableInMemoryEntity_base: HasMetadataNamedDefaultableBase;
21+
export declare class HasMetadataNamedDefaultableInMemoryEntity extends HasMetadataNamedDefaultableInMemoryEntity_base {
922
}
10-
export declare class HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntity extends HasMetadataNamedDefaultableInMemoryEntity {
23+
declare const HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntity_base: HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntityBase;
24+
export declare class HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntity extends HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntity_base {
1125
}
1226
export declare const NamedDefaultableRepetitionImportantSettingsInMemoryEntity: {
1327
new (...args: any[]): {
@@ -393,3 +407,4 @@ export declare const NamedDefaultableRepetitionRuntimeItemsImportantSettingsCont
393407
readonly isSystemEntity: boolean;
394408
};
395409
} & typeof NamedDefaultableInMemoryEntity;
410+
export {};

dist/js/entity/other.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ class NamedInMemoryEntity extends in_memory_1.InMemoryEntity {
1919
}
2020
exports.NamedInMemoryEntity = NamedInMemoryEntity;
2121
(0, NamedEntityMixin_1.namedEntityMixin)(NamedInMemoryEntity.prototype);
22-
class NamedDefaultableInMemoryEntity extends DefaultableInMemoryEntity {
22+
class NamedDefaultableInMemoryEntity extends in_memory_1.InMemoryEntity {
2323
}
2424
exports.NamedDefaultableInMemoryEntity = NamedDefaultableInMemoryEntity;
2525
(0, NamedEntityMixin_1.namedEntityMixin)(NamedDefaultableInMemoryEntity.prototype);
26-
class HasMetadataNamedDefaultableInMemoryEntity extends NamedDefaultableInMemoryEntity {
26+
class HasMetadataNamedDefaultableInMemoryEntity extends in_memory_1.InMemoryEntity {
2727
}
2828
exports.HasMetadataNamedDefaultableInMemoryEntity = HasMetadataNamedDefaultableInMemoryEntity;
2929
(0, HasMetadataMixin_1.hasMetadataMixin)(HasMetadataNamedDefaultableInMemoryEntity.prototype);

src/js/entity/other.ts

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,54 @@
11
import { InMemoryEntity } from "./in_memory";
22
import { ContextAndRenderFieldsMixin, ImportantSettingsProviderMixin } from "./mixins/context";
3-
import { defaultableEntityMixin, defaultableEntityStaticMixin } from "./mixins/DefaultableMixin";
4-
import { hasConsistencyChecksMixin } from "./mixins/HasConsistencyChecksMixin";
3+
import {
4+
type DefaultableInMemoryEntityConstructor,
5+
defaultableEntityMixin,
6+
defaultableEntityStaticMixin,
7+
} from "./mixins/DefaultableMixin";
8+
import {
9+
type HasConsistencyChecksInMemoryEntityConstructor,
10+
hasConsistencyChecksMixin,
11+
} from "./mixins/HasConsistencyChecksMixin";
512
import { HashedEntityMixin } from "./mixins/hash";
6-
import { hasMetadataMixin } from "./mixins/HasMetadataMixin";
7-
import { namedEntityMixin } from "./mixins/NamedEntityMixin";
13+
import {
14+
type HasMetadataInMemoryEntityConstructor,
15+
hasMetadataMixin,
16+
} from "./mixins/HasMetadataMixin";
17+
import { type NamedInMemoryEntityConstructor, namedEntityMixin } from "./mixins/NamedEntityMixin";
818
import { HasRepetitionMixin } from "./mixins/repetition";
919
import { RuntimeItemsUIAllowedMixin, RuntimeItemsUILogicMixin } from "./mixins/runtime_items";
1020

11-
export class DefaultableInMemoryEntity extends InMemoryEntity {}
21+
type DefaultableBase = typeof InMemoryEntity & DefaultableInMemoryEntityConstructor;
22+
23+
type NamedBase = typeof InMemoryEntity & NamedInMemoryEntityConstructor;
24+
25+
type NamedDefaultableBase = typeof InMemoryEntity &
26+
DefaultableInMemoryEntityConstructor &
27+
NamedInMemoryEntityConstructor;
28+
29+
type HasMetadataNamedDefaultableBase = typeof InMemoryEntity &
30+
DefaultableInMemoryEntityConstructor &
31+
NamedInMemoryEntityConstructor &
32+
HasMetadataInMemoryEntityConstructor;
33+
34+
type HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntityBase =
35+
typeof HasMetadataNamedDefaultableInMemoryEntity &
36+
HasConsistencyChecksInMemoryEntityConstructor;
37+
38+
export class DefaultableInMemoryEntity extends (InMemoryEntity as DefaultableBase) {}
1239
defaultableEntityMixin(DefaultableInMemoryEntity.prototype);
1340
defaultableEntityStaticMixin(DefaultableInMemoryEntity);
1441

15-
export class NamedInMemoryEntity extends InMemoryEntity {}
42+
export class NamedInMemoryEntity extends (InMemoryEntity as NamedBase) {}
1643
namedEntityMixin(NamedInMemoryEntity.prototype);
1744

18-
export class NamedDefaultableInMemoryEntity extends DefaultableInMemoryEntity {}
45+
export class NamedDefaultableInMemoryEntity extends (InMemoryEntity as NamedDefaultableBase) {}
1946
namedEntityMixin(NamedDefaultableInMemoryEntity.prototype);
2047

21-
export class HasMetadataNamedDefaultableInMemoryEntity extends NamedDefaultableInMemoryEntity {}
48+
export class HasMetadataNamedDefaultableInMemoryEntity extends (InMemoryEntity as HasMetadataNamedDefaultableBase) {}
2249
hasMetadataMixin(HasMetadataNamedDefaultableInMemoryEntity.prototype);
2350

24-
export class HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntity extends HasMetadataNamedDefaultableInMemoryEntity {}
51+
export class HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntity extends (HasMetadataNamedDefaultableInMemoryEntity as HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntityBase) {}
2552
hasConsistencyChecksMixin(HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntity.prototype);
2653

2754
export const NamedDefaultableRepetitionImportantSettingsInMemoryEntity =

0 commit comments

Comments
 (0)