-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathtutorial.d.ts
94 lines (80 loc) Β· 1.82 KB
/
tutorial.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import { ProgressStatus } from './index'
export type Maybe<T> = T | null
export type ConfigReset = {
commands?: string[]
vscodeCommands?: VSCodeCommand[]
}
export type TutorialConfig = {
appVersions?: TutorialAppVersions
testRunner: TestRunnerConfig
repo: TutorialRepo
dependencies?: TutorialDependency[]
setup?: StepActions
reset?: ConfigReset
}
/** Logical groupings of tasks */
export type Level = {
id: string
title: string
/** A summary of the level */
summary: string
/** The lesson content of the level, parsed as markdown */
content: string
/** Actions run on level start up for configuring setup */
setup?: Maybe<StepActions>
/** A set of tasks for users linked to unit tests */
steps: Array<Step>
status?: ProgressStatus
}
/** A level task */
export type Step = {
id: string
content: string
setup: StepActions
solution?: Maybe<StepActions>
hints?: string[]
subtasks?: string[]
}
/** A tutorial for use in VSCode CodeRoad */
export type Tutorial = {
id: string
version: string
summary: TutorialSummary
config: TutorialConfig
levels: Array<Level>
}
/** Summary of tutorial used when selecting tutorial */
export type TutorialSummary = {
title: string
description: string
}
export type StepActions = {
commands?: string[]
commits?: string[]
files?: string[]
watchers?: string[]
filter?: string
vscodeCommands?: VSCodeCommand[]
}
export interface TestRunnerArgs {
filter?: string
tap: string
}
export interface TestRunnerConfig {
command: string
args: TestRunnerArgs
directory?: string
}
export interface TutorialRepo {
uri: string
branch: string
}
export interface TutorialDependency {
name: string
version: string
message?: string
}
export interface TutorialAppVersions {
vscode: string
}
export type VSCodeCommand = string | [string, any]