yarn-spinner-loader/src/core.ts

69 lines
1.2 KiB
TypeScript

/**
* Yarn Spinner Loader - Core API
*
* Pure functions and types for working with Yarn Spinner.
* This module does NOT depend on Node.js modules.
*/
// Parser
export { parseYarn, ParseError } from './yarn-spinner/parse/parser';
// Compiler
export { compile, type CompileOptions } from './yarn-spinner/compile/compiler';
// Runner
export { YarnRunner, type RunnerOptions } from './yarn-spinner/runtime/runner';
// AST types
export type {
Position,
NodeHeaderMap,
YarnDocument,
EnumDefinition,
YarnNode,
Statement,
Line,
Command,
Jump,
Detour,
Return,
OptionGroup,
Option,
IfBlock,
OnceBlock,
EnumBlock,
} from './yarn-spinner/model/ast';
// IR types
export type {
IRProgram,
IRNode,
IRNodeGroup,
IRInstruction,
} from './yarn-spinner/compile/ir';
// Runtime types
export type {
TextResult,
OptionsResult,
CommandResult,
RuntimeResult,
} from './yarn-spinner/runtime/results';
// Markup types
export type {
MarkupValue,
MarkupWrapperType,
MarkupWrapper,
MarkupSegment,
MarkupParseResult,
} from './yarn-spinner/markup/types';
// Loader types
export type {
LoadOptions,
LoadResult,
YarnProject,
SchemaValidationError,
} from './types';