Home > @rushstack/node-core-library > JsonFile > loadAndValidateWithCallbackAsync
JsonFile.loadAndValidateWithCallbackAsync() method
An async version of JsonFile.loadAndValidateWithCallback().
Signature:
static loadAndValidateWithCallbackAsync(jsonFilename: string, jsonSchema: JsonSchema, errorCallback: (errorInfo: IJsonSchemaErrorInfo) => void, options?: IJsonFileLoadAndValidateOptions): Promise<JsonObject>;
Parameters
Parameter | Type | Description |
---|---|---|
jsonFilename | string | |
jsonSchema | JsonSchema | |
errorCallback | (errorInfo: IJsonSchemaErrorInfo) => void | |
options | IJsonFileLoadAndValidateOptions | (Optional) |
Returns:
Promise<JsonObject>