Rush StackShopBlogEvents
Skip to main content

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

ParameterTypeDescription
jsonFilenamestring
jsonSchemaJsonSchema
errorCallback(errorInfo: IJsonSchemaErrorInfo) => void
optionsIJsonFileLoadAndValidateOptions(Optional)

Returns:

Promise<JsonObject>