@kosdev-code/kos-ui-sdk 3.0.27 → 3.0.28

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.
@@ -8,7 +8,7 @@ export interface KosCompanionOptions {
8
8
  /**
9
9
  * Pattern mode:
10
10
  * - 'decorator': Proxy all parent properties transparently (default)
11
- * - 'composition': Only provide getCompanionParent() method
11
+ * - 'composition': Only provide getCompanionParent() and the parentProperty getter
12
12
  */
13
13
  mode?: "decorator" | "composition";
14
14
  /** Properties to exclude from proxying (only applies in decorator mode). Default: [] */
@@ -34,9 +34,9 @@ export type KosMixinOptions<O> = O extends {
34
34
  * in the decorated property, there from the moment the host is created and observable,
35
35
  * so the host's effects can react to it.
36
36
  *
37
- * The mixin calls back into the host through `getCompanionParent()`, typed by the host
38
- * interface it declares; a host that does not implement that interface does not
39
- * compile.
37
+ * The mixin calls back into the host through a `host` getter (`parentProperty: "host"`),
38
+ * typed by the host interface it declares; a host that does not implement that
39
+ * interface does not compile.
40
40
  *
41
41
  * @param mixin The mixin model's registration.
42
42
  * @param options The mixin's model options, received as `options.data`. Any option can
@@ -46,10 +46,12 @@ export type KosMixinOptions<O> = O extends {
46
46
  * @example
47
47
  * ```typescript
48
48
  * interface DirtyHost extends IKosDataModel { onDirtyChanged?(dirty: boolean): void }
49
- * interface DirtyTrackingImpl extends KosCompanionComposition<DirtyHost> {}
49
+ * interface DirtyTrackingImpl extends KosCompanionComposition<DirtyHost> {
50
+ * readonly host: DirtyHost;
51
+ * }
50
52
  *
51
53
  * @kosModel("dirty-tracking")
52
- * @kosCompanion({ mode: "composition" })
54
+ * @kosCompanion({ mode: "composition", parentProperty: "host" })
53
55
  * class DirtyTrackingImpl implements IKosDataModel { ... }
54
56
  *
55
57
  * @kosModel("recipe")
@@ -1 +1 @@
1
- {"version":3,"file":"kos-mixin.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-mixin.ts"],"names":[],"mapp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