speculate
speculate(
options):Promise<SpeculateResult>
Defined in: pipeline/index.ts:42
Process a specification with the given plugins.
This is the main entrypoint for the speculator pipeline.
Parameters
Section titled “Parameters”options
Section titled “options”Pipeline options including entry, config, and plugins
Returns
Section titled “Returns”Promise<SpeculateResult>
Result with document and diagnostics
Example
Section titled “Example”import { speculate, coreMarkdownPlugin, coreHtmlPlugin } from 'speculator';
const result = await speculate({ entry: './spec/index.md', configPath: './spec/config.respec.json', plugins: [coreMarkdownPlugin, coreHtmlPlugin],});
if (!result.hasErrors) { console.log(result.document);}