validate() function

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Validate a message.


export declare function validate(msg: Readonly<Message>, runtime: Runtime): void;


Parameter Type Description
msg Readonly<Message>  
runtime Runtime  




Throws if msg is a JunkMessage, if it contains parse errors, or of if references runtime functions that are not available in the runtime.

Formatting a message that passes validation may still fail, as it may depend on parameters that are not passed in, or its runtime function calls may fail.