Open
Description
Obsidian exposes a convenience type for typing graphs - dependenciesOf.
We can create an ESLint plugin to ensure each graph has the type exported correctly.
- The rule should be auto-fixable so the type is generated automatically on save
- The rule must take subgraphs into account.
Graph | Type |
---|---|
@graph() export class AppGraph extends ObjectGraph {} |
export type = dependenciesOf; |
@graph({subgraphs: [Subgraph]}) export AppGraph extends ObjectGraph {} |
export type = dependenciesOf<[AppGraph, Subgraph]>; |