Skip to content

Commit 9a76dc1

Browse files
authored
Update allowed-types-rollout.mdx file to use beta APIs (#25871)
## Description This PR updates the `allowed-types-rollout.mdx` to use beta APIs
1 parent d49ae61 commit 9a76dc1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/docs/data-structures/tree/schema-evolution/allowed-types-rollout.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ There are some differences because this guide describes the example as a real sc
1919
We start with a schema that only supports numbers and initialize the tree with it:
2020
```typescript
2121
// Schema A: only number allowed
22-
const schemaA = SchemaFactoryAlpha.optional([SchemaFactoryAlpha.number]);
22+
const schemaA = SchemaFactoryBeta.optional([SchemaFactoryBeta.number]);
2323

2424
// initialize with schema A
2525
const configA = new TreeViewConfiguration({
@@ -36,9 +36,9 @@ To add support for reading strings, we import the alpha APIs and use [`staged`](
3636

3737
```typescript
3838
// Schema B: number or string (string is staged)
39-
const schemaB = SchemaFactoryAlpha.optional(SchemaFactoryAlpha.types([
40-
SchemaFactoryAlpha.number,
41-
SchemaFactoryAlpha.staged(SchemaFactoryAlpha.string),
39+
const schemaB = SchemaFactoryBeta.optional(SchemaFactoryBeta.types([
40+
SchemaFactoryBeta.number,
41+
SchemaFactoryBeta.staged(SchemaFactoryBeta.string),
4242
]));
4343
```
4444

@@ -79,9 +79,9 @@ Once client saturation has been reached, remove the [`staged()`](../../../api/fl
7979

8080
```typescript
8181
// Schema C: number or string, both fully allowed
82-
const schemaC = SchemaFactoryAlpha.optional([
83-
SchemaFactoryAlpha.number,
84-
SchemaFactoryAlpha.string,
82+
const schemaC = SchemaFactoryBeta.optional([
83+
SchemaFactoryBeta.number,
84+
SchemaFactoryBeta.string,
8585
]);
8686

8787
// view third tree with schema C

0 commit comments

Comments
 (0)