Skip to content

Commit

Permalink
specified that enforce="throw" is dev only
Browse files Browse the repository at this point in the history
  • Loading branch information
Flammae committed Dec 2, 2023
1 parent ac7649e commit 78bf5a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,9 @@ type-safe by default. Its type is inferred from the array you pass to
`allowedNodes`. This means you can define complex override logic, and you'll get
a type error if the element you are overriding changes its implementation. **The
downside of `OverrideNode` itself is that it cannot enforce the type of allowed
nodes on the type level; instead, a run-time error is thrown by default when the
parent provides the wrong type of node.**
nodes on the type level; instead, a development only run-time error is thrown by
default when the parent provides the wrong type of node. In the production,
disallowed nodes are removed**

To make parents type-safe, all you have to do is use type-safe templates. You
can create type-safe templates with either the `CreateTemplate` type or a
Expand Down

0 comments on commit 78bf5a5

Please sign in to comment.