obsidian/internals/constructors
Interfaces
Section titled “Interfaces”| Interface | Description |
|---|---|
| BasesLinkConstructor | Bases link constructor. Extends ExtractConstructor with a static parseFromString method. |
| ConstructorBase | Base type representing a constructor function that creates instances of the given type. |
| ExtractConstructor | Extracts a constructor type from an interface that defines a constructor__, constructor2__, constructor3__, constructor4__, or constructor5__ method. Prefers higher-numbered variants over lower-numbered ones when multiple are present, since higher-numbered variants represent deeper subclass constructors when ancestor classes already define lower-numbered ones. The constructor[N]__ helpers are declared optional (constructor[N]__?), so matching is done via 'constructor[N]__' extends keyof T (which sees optional keys) combined with NonNullable (which strips the | undefined an optional member carries), rather than T extends \{ constructor[N]__(): … \} (which no longer matches an optional method). The final branch still accepts a function type passed directly (e.g. ExtractConstructor<App['constructor__']>), NonNullable likewise tolerating its optional | undefined. |
| NodeConstructor | Node constructor. |
| UIEventConstructor | UIEvent constructor. |