getSchema Method
Attempts to get a schema from the locater. Yields undefined if no matching schema is found. For schemas that may have references, construct and call through a SchemaContext instead.
getSchema<T extends Schema<T>>(schemaKey: Readonly<SchemaKey>, matchType: SchemaMatchType, context: SchemaContext): Promise<undefined | T>
Parameter | Type | Description |
---|---|---|
schemaKey | Readonly<SchemaKey> | key to look up |
matchType | SchemaMatchType | how to match key against candidate schemas |
context | SchemaContext | context for loading schema references |
Returns - Promise<undefined | T>
Defined in
- ecschema-metadata/src/Context.ts Line 44
Last Updated: 16 April, 2024
Found something wrong, missing, or unclear on this page?
Raise an issue in our repo.