Skip to main content

parse_source

Function parse_source 

Source
pub fn parse_source(
    source: &str,
    lib_name: Option<&str>,
) -> Result<(Module, GlobalContext)>
Expand description

Parse a single .d.ts source string and return the module + global context.

Diagnostics are collected on GlobalContext.diagnostics — callers should inspect or display them as needed (e.g., ctx.diagnostics.emit()).