1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-13 18:53:59 +02:00

docs: Improve wording on TypeScript docs and emphasized the warning

This commit is contained in:
Sunny Hirai
2021-03-29 18:07:45 -07:00
parent c168ac6e7b
commit 4425a783fc

View File

@@ -1,10 +1,9 @@
# TypeScript
Slate supports typing of one Slate document model (eg. one set of custom `Editor`, `Element` and `Text` types).
Slate supports typing of one Slate document model (ie. one set of custom `Editor`, `Element` and `Text` types). If you need to support more than one document model, see the section Multiple Document Models.
You must define `CustomTypes` when using TypeScript or Slate will display typing errors.
**Warning:** You must define `CustomTypes` when using TypeScript or Slate will display typing errors.
If you need to support more than one document model, see the section Multiple Document Models.
## Defining `Editor`, `Element` and `Text` Types