|
1 | 1 | import { InMemoryEntity } from "./in_memory";
|
2 | 2 | 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"; |
5 | 12 | 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"; |
8 | 18 | import { HasRepetitionMixin } from "./mixins/repetition";
|
9 | 19 | import { RuntimeItemsUIAllowedMixin, RuntimeItemsUILogicMixin } from "./mixins/runtime_items";
|
10 | 20 |
|
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) {} |
12 | 39 | defaultableEntityMixin(DefaultableInMemoryEntity.prototype);
|
13 | 40 | defaultableEntityStaticMixin(DefaultableInMemoryEntity);
|
14 | 41 |
|
15 |
| -export class NamedInMemoryEntity extends InMemoryEntity {} |
| 42 | +export class NamedInMemoryEntity extends (InMemoryEntity as NamedBase) {} |
16 | 43 | namedEntityMixin(NamedInMemoryEntity.prototype);
|
17 | 44 |
|
18 |
| -export class NamedDefaultableInMemoryEntity extends DefaultableInMemoryEntity {} |
| 45 | +export class NamedDefaultableInMemoryEntity extends (InMemoryEntity as NamedDefaultableBase) {} |
19 | 46 | namedEntityMixin(NamedDefaultableInMemoryEntity.prototype);
|
20 | 47 |
|
21 |
| -export class HasMetadataNamedDefaultableInMemoryEntity extends NamedDefaultableInMemoryEntity {} |
| 48 | +export class HasMetadataNamedDefaultableInMemoryEntity extends (InMemoryEntity as HasMetadataNamedDefaultableBase) {} |
22 | 49 | hasMetadataMixin(HasMetadataNamedDefaultableInMemoryEntity.prototype);
|
23 | 50 |
|
24 |
| -export class HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntity extends HasMetadataNamedDefaultableInMemoryEntity {} |
| 51 | +export class HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntity extends (HasMetadataNamedDefaultableInMemoryEntity as HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntityBase) {} |
25 | 52 | hasConsistencyChecksMixin(HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntity.prototype);
|
26 | 53 |
|
27 | 54 | export const NamedDefaultableRepetitionImportantSettingsInMemoryEntity =
|
|
0 commit comments