(cache: unknown)
| 432 | } |
| 433 | |
| 434 | private getFrontmatterFromCache(cache: unknown): Record<string, unknown> | null { |
| 435 | if (!cache || typeof cache !== "object" || !("frontmatter" in cache)) { |
| 436 | return null; |
| 437 | } |
| 438 | |
| 439 | const frontmatter = (cache as { frontmatter?: unknown }).frontmatter; |
| 440 | if (!frontmatter || typeof frontmatter !== "object" || Array.isArray(frontmatter)) { |
| 441 | return null; |
| 442 | } |
| 443 | |
| 444 | return frontmatter as Record<string, unknown>; |
| 445 | } |
| 446 | |
| 447 | private getFrontmatterForPath(path: string): Record<string, unknown> | null { |
| 448 | const file = this.app.vault.getAbstractFileByPath(path); |
no outgoing calls
no test coverage detected