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 fluid-framework/alpha
.
For more information about our API support guarantees, see here.
Input
This type is "input," meaning that code outside of the library defining it should not read from it. Future versions of this type may add optional members or make typing of members more general.
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.
For more information about our API support guarantees, see here.
Input
This type is "input," meaning that code outside of the library defining it should not read from it. Future versions of this type may add optional members or make typing of members more general.
Signature
check(data: unknown): data is Static<Schema>;
Parameters
Parameter | Type | Description |
---|---|---|
data | unknown |
Returns
Return type: data is Static<Schema>