You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/dds/tree/src/index.ts
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -123,6 +123,7 @@ export {
123
123
typeWithType,
124
124
typeNodeChangedData,
125
125
typeSchemaUpgrade,
126
+
schemaSymbol,
126
127
// Types not really intended for public use, but used in links.
127
128
// Can not be moved to internalTypes since doing so causes app code to throw errors like:
128
129
// Error: src/simple-tree/objectNode.ts:72:1 - (ae-unresolved-link) The @link reference could not be resolved: The package "@fluidframework/tree" does not have an export "TreeNodeApi"
* The intended type of insertable content that is to become a {@link TreeNode}.
47
+
* @remarks **Note:** Whenever possible, use the type-safe {@link (TreeAlpha:interface).ensureSchema} function rather than manually employing this symbol.
48
+
*
49
+
* If a property with this symbol key is present on an object that is inserted into the tree,
50
+
* the tree will use the schema identifier specified by the value of this property when creating the node.
51
+
* This is particularly useful for specifying the intended schema of untyped content when it would otherwise be ambiguous.
52
+
* @example
53
+
* ```typescript
54
+
* const sf = new SchemaFactory("example");
55
+
* class Dog extends sf.object("Dog", { name: sf.string() }) {}
56
+
* class Cat extends sf.object("Cat", { name: sf.string() }) {}
0 commit comments