Skip to content

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.

SpeculateOptions

Pipeline options including entry, config, and plugins

Promise<SpeculateResult>

Result with document and diagnostics

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);
}