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): Promise<JsonObject>;

Parameters

Parameter Type Description
jsonFilename string  
jsonSchema JsonSchema  
errorCallback (errorInfo: IJsonSchemaErrorInfo) => void  

Returns:

Promise<JsonObject>