lesson-types.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. export type TeachingLesson = {
  2. kind?: 'practical' | 'theory';
  3. id: string;
  4. group: string;
  5. title: string;
  6. summary: string;
  7. intro: {
  8. scenario: string;
  9. startingPoint: string[];
  10. outcome: string;
  11. };
  12. objectives: string[];
  13. concepts: { title: string; body: string }[];
  14. steps: {
  15. title: string;
  16. body: string;
  17. expected: string;
  18. explanation: string;
  19. code?: string;
  20. lang?: string;
  21. filename?: string;
  22. }[];
  23. checks: string[];
  24. pitfalls: { symptom: string; cause: string; fix: string }[];
  25. exercise: { task: string; hint: string; answer: string };
  26. refs: { label: string; url: string }[];
  27. demo?: 'http' | 'async' | 'protocol';
  28. interview?: {
  29. question: string;
  30. answer: string;
  31. followUps: string[];
  32. };
  33. production?: {
  34. scenario: string;
  35. decisions: string[];
  36. failureDrill: string;
  37. acceptance: string[];
  38. };
  39. };
  40. export type ReviewItem = {
  41. id: string;
  42. title: string;
  43. prompt: string;
  44. checkpoints: string[];
  45. misconception: string;
  46. revisit: { lessonId: string; label: string }[];
  47. };
  48. export type ReviewLesson = {
  49. kind: 'review';
  50. id: string;
  51. group: string;
  52. title: string;
  53. summary: string;
  54. sourceModule: string;
  55. intro: {
  56. scenario: string;
  57. startingPoint: string[];
  58. outcome: string;
  59. };
  60. questions: ReviewItem[];
  61. challenges: ReviewItem[];
  62. mastery: { id: string; text: string; evidence: string }[];
  63. };
  64. export type Lesson = TeachingLesson | ReviewLesson;
  65. export type Video = {
  66. type: 'file' | 'link';
  67. url: string;
  68. title?: string;
  69. captions?: string;
  70. };