getSchemaItemSync Method


getSchemaItemSync<T extends >(schemaItemKey, itemConstructor)

getSchemaItemSync<T extends >(schemaItemKey: SchemaItemKey, itemConstructor: T): undefined | InstanceType<T>

Parameter Type Description
schemaItemKey SchemaItemKey  
itemConstructor T  

Returns - undefined | InstanceType<T>



getSchemaItemSync(schemaItemKey)

Gets the schema item from the specified schema if it exists in this SchemaContext. Will return undefined if the cached schema is partially loaded. Use getSchemaItem to await until the schema is completely loaded.

getSchemaItemSync(schemaItemKey: SchemaItemKey): undefined | SchemaItem

@returns The requested schema item

Parameter Type Description
schemaItemKey SchemaItemKey The SchemaItemKey identifying the item to return. SchemaMatchType.Latest is used to match the schema.

Returns - undefined | SchemaItem

The requested schema item


Defined in

Last Updated: 21 February, 2025