Function
Decorator that binds a reactive signal to a nested GradumModel at the given key path, where the nested model's data is not stored inside the parent model's data container.
Use this when the nested model holds data that lives outside the parent's data tree — for example, a Y.js type that is already part of a Y.js document at a different location. Unlike nestedModelSignal, this decorator does not write to the parent model's data when the value is set, so it will not attempt to insert a foreign Y.js type into the parent's Y.js structure (which would throw, since a Y.js type can only belong to one place in a document).
this.nest(...keys).nestedModel.data = value, leaving the parent's data untouched.Limitation: @modelSignal("myField", "subKey") will not work for a field backed by
@isolatedModelSignal, because GradumModel.get() reads through the parent's data container
rather than routing through registered nested models. Access sub-keys directly through the
nested model instead: (this.myField as MyNestedModel).subKey.
class CardModel extends GradumYModel {
// Foreign YMap managed elsewhere in the Y.js document — must not be written into this
// model's data tree.
@isolatedModelSignal() cardData: CardDataModel;
}
Is equivalent to:
class CardModel extends GradumYModel {
@signal get cardData() { return this.nest("cardData"); }
set cardData(value) { this.nest("cardData").data = value; }
}
The key path identifying the nested model slot. Defaults to the decorated property name if omitted.