SchemaValidationFunction Interface
Validates data complies with some particular schema. Implementations are typically created by a JsonValidator.
This API is provided as an alpha preview and may change without notice.
To use, import via @fluidframework/tree/alpha
.
For more information about our API support guarantees, see here.
Signature
export interface SchemaValidationFunction<Schema extends TSchema>
Type Parameters
Parameter | Constraint | Description |
---|---|---|
Schema | TSchema |
Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
check(data) | Alpha |
data is Static<Schema> | Returns whether the data matches a schema. |
Method Details
check
Returns whether the data matches a schema.
This API is provided as an alpha preview and may change without notice.
To use, import via @fluidframework/tree/alpha
.
For more information about our API support guarantees, see here.
Signature
check(data: unknown): data is Static<Schema>;
Parameters
Parameter | Type | Description |
---|---|---|
data | unknown |
Returns
Return type: data is Static<Schema>