addSchemaPromise Method

Adds a promise to load the schema to the cache. Does not allow for duplicate schemas in the cache of schemas or cache of promises, checks using SchemaMatchType.Latest. When the promise completes the schema will be added to the schema cache and the promise will be removed from the promise cache. Use this method over addSchema when asynchronously loading schemas

addSchemaPromise(schemaInfo: SchemaInfo, schema: Schema, schemaPromise: Promise<Schema>): Promise<void>

Parameter Type Description
schemaInfo SchemaInfo An object with the schema key for the schema being loaded and it's references
schema Schema The partially loaded schema that the promise will fulfill
schemaPromise Promise<Schema> The schema promise to add to the cache.

Returns - Promise

Defined in

Last Updated: 14 November, 2024