Skip to content

Commit ebb38a0

Browse files
committed
📝 Update Snapshot documentation
`Snapshot.type` should be marked as a `string`, since it's a serializable form of a `Doc`, and the serializable form of a type is its URI. The `snapshot.type` is assumed to be a URI at many points in the code: - https://github.com/share/sharedb/blob/e29936ca2dffd187b3fcfa3ca1b7e83becb6a2dc/lib/projections.js#L82 - https://github.com/share/sharedb/blob/99ea28e003bdba4e7fcba7c45e70d47f30ea96f5/lib/ot.js#L80 - https://github.com/share/sharedb/blob/e29936ca2dffd187b3fcfa3ca1b7e83becb6a2dc/lib/agent.js#L562-L563
1 parent 916705a commit ebb38a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/api/snapshot.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ Snapshots can **not** be used to manipulate the current version of the document
1717

1818
## Properties
1919

20-
### `type` -- [Type]({{ site.baseurl }}{% link types/index.md %})
20+
### `type` -- string
2121

22-
> The document [type]({{ site.baseurl }}{% link types/index.md %})
22+
> The URI of the document [type]({{ site.baseurl }}{% link types/index.md %})
2323
2424
{: .info }
2525
> Document types can change between versions if the document is deleted, and created again.

0 commit comments

Comments
 (0)