Skip to main content

write_plugin_declarations

Function write_plugin_declarations 

Source
pub fn write_plugin_declarations(
    config_dir: &Path,
    declarations: &[(String, String)],
)
Expand description

Write <config_dir>/types/plugins.d.ts from the .d.ts emit of each loaded plugin. The editor calls this after scanning every plugin directory, so by the time init.ts is evaluated the ambient FreshPluginRegistry is fully populated and editor.getPluginApi("dashboard") resolves to the typed overload.

Errors are logged but not returned: an empty or stale plugins.d.ts must not block startup.