MetadataCache.on('resolve') method
MetadataCache › on(‘resolve’)
Official
Called when a file has been resolved forresolvedLinks and unresolvedLinks. This happens sometimes after a file has been indexed. Signature:
on(name: "resolve", callback: (file: TFile) => unknown, ctx?: unknown): EventRefParameters:
| Parameter | Type | Description |
|---|---|---|
| name | "resolve" | Should be 'resolve'. |
| callback | (file: TFile) => unknown | The callback function. |
| ctx? | unknown | The context passed as this to the callback function. |
Returns: EventRef — The event reference.
Example:
app.metadataCache.on('resolve', (file) => { console.log(file);});