File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ zxMain(async () => {
90
90
const response = await canRender ( fp ) ;
91
91
92
92
if ( response . ok ) {
93
- renderTimes . push ( response . timeTaken ! ) ;
93
+ renderTimes . push ( response . timeTaken ) ;
94
94
} else {
95
95
console . error ( `❌ Failed to render: ${ fp } ` ) ;
96
96
failures . push ( fp ) ;
@@ -119,12 +119,10 @@ zxMain(async () => {
119
119
}
120
120
} ) ;
121
121
122
- type RenderResult = {
123
- ok : boolean ;
124
- timeTaken ?: number ;
125
- } ;
122
+ type RenderSuccess = { ok : true ; timeTaken : number } ;
123
+ type RenderFailure = { ok : false } ;
126
124
127
- async function canRender ( fp : string ) : Promise < RenderResult > {
125
+ async function canRender ( fp : string ) : Promise < RenderSuccess | RenderFailure > {
128
126
const url = pathToUrl ( fp ) ;
129
127
let timeTaken ;
130
128
try {
You can’t perform that action at this time.
0 commit comments