Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2f4e5cd

Browse files
committed
fix tsc updated typings
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parenta95568f commit2f4e5cd

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

‎src/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ async function build (args: string[]) {
9191
// parse yaml skeleton config
9292
letskeleton
9393
try{
94-
skeleton=yamlParser.load(_yaml)
94+
skeleton=yamlParser.load(_yaml)asT.TutorialSkeleton
9595
if(!skeleton||!Object.keys(skeleton).length){
9696
thrownewError(`Skeleton at "${options.yaml}" is invalid`)
9797
}

‎src/validate.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
createTestRunner
1010
}from'./utils/exec'
1111
import{getCommits,CommitLogObject}from'./utils/commits'
12+
import{TutorialSkeleton}from'../typings/tutorial'
1213

1314
interfaceOptions{
1415
yaml:string
@@ -34,14 +35,15 @@ async function validate (args: string[]) {
3435
// parse yaml config
3536
letskeleton
3637
try{
37-
skeleton=yamlParser.load(_yaml)
38+
skeleton=yamlParser.load(_yaml)asTutorialSkeleton
3839

3940
if(!skeleton){
4041
thrownewError('Invalid yaml file contents')
4142
}
4243
}catch(e){
4344
console.error('Error parsing yaml')
4445
console.error(e.message)
46+
return
4547
}
4648

4749
constcodeBranch:string=skeleton.config.repo.branch
@@ -106,7 +108,7 @@ async function validate (args: string[]) {
106108
awaitcherryPick(stepSetupCommits)
107109
}
108110
// run commands
109-
if(step.setup.commands){
111+
if(step?.setup?.commands){
110112
console.info(`--- Running setup commands...`)
111113
awaitrunCommands(step.setup.commands)
112114
}

‎typings/tutorial.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,8 @@ export interface TutorialDependency {
8686
exportinterfaceTutorialAppVersions{
8787
vscode:string
8888
}
89+
90+
exportinterfaceTutorialSkeleton{
91+
config:TutorialConfig
92+
levels:Level[]
93+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp