/** * Demo utilities for quick testing and exploration * * @packageDocumentation */ import type { ParseResult, SkillExtractionResult, ExtractionOptions } from '../types/parser.js'; import type { SkillNode, PrerequisiteEdge, GraphStats } from '../types/index.js'; import { type SampleSyllabusName } from './samples.js'; /** * Result of the demo function */ export interface DemoResult { /** Parse result with extracted modules, topics, objectives */ parseResult: ParseResult; /** Skill extraction result */ extraction: SkillExtractionResult; /** Skills created in storage */ skills: SkillNode[]; /** Prerequisite edges created */ edges: PrerequisiteEdge[]; /** Graph statistics */ stats: GraphStats; } /** * Try LearnGraph with a sample syllabus * * This is the easiest way to see LearnGraph in action. * * @example * ```typescript * import { tryWithSample } from 'learngraph/parsers'; * * // Try with physics syllabus * const result = await tryWithSample('physics'); * console.log(`Created ${result.skills.length} skills!`); * console.log('Skills:', result.skills.map(s => s.name)); * * // Try with kindergarten math * const kResult = await tryWithSample('kindergarten'); * console.log(`Kindergarten: ${kResult.skills.length} skills`); * ``` */ export declare function tryWithSample(sample?: SampleSyllabusName): Promise; /** * Try LearnGraph with your own syllabus * * Paste your syllabus as markdown and see the magic happen! * * @example * ```typescript * import { tryWithSyllabus } from 'learngraph/parsers'; * * const mySyllabus = ` * # My Course * * ## Week 1: Introduction * * ### Learning Objectives * - Understand the course structure * - Identify key topics * - Apply basic concepts * `; * * const result = await tryWithSyllabus(mySyllabus); * console.log('Found', result.parseResult.stats.objectiveCount, 'objectives'); * console.log('Created', result.skills.length, 'skills'); * * // See the skills * for (const skill of result.skills) { * console.log(`- ${skill.name} (${skill.bloomLevel}, difficulty: ${skill.difficulty})`); * } * ``` */ export declare function tryWithSyllabus(syllabus: string, options?: ExtractionOptions): Promise; /** * Quick console output of demo results * * @example * ```typescript * import { tryWithSample, printDemoResults } from 'learngraph/parsers'; * * const result = await tryWithSample('physics'); * printDemoResults(result); * ``` */ export declare function printDemoResults(result: DemoResult): void; //# sourceMappingURL=demo.d.ts.map