File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import type {
6
6
Interface ,
7
7
WebIdl ,
8
8
Method ,
9
+ Typed ,
9
10
} from "./types.js" ;
10
11
import { readdir , readFile } from "fs/promises" ;
11
12
import { merge } from "./helpers.js" ;
@@ -39,13 +40,11 @@ function string(arg: unknown): string {
39
40
return arg ;
40
41
}
41
42
42
- function handleTyped ( type : Node , returnType ?: Value ) {
43
+ function handleTyped ( type : Node , returnType ?: Value ) : Typed {
43
44
const isTyped = type . name == "type" ;
44
45
const name = string ( isTyped ? type . values [ 0 ] : returnType ) ;
45
46
const subType =
46
- type . children . length > 0
47
- ? { type : string ( type . children [ 0 ] . values [ 0 ] ) }
48
- : undefined ;
47
+ type . children . length > 0 ? handleTyped ( type . children [ 0 ] , name ) : undefined ;
49
48
return {
50
49
type : name ,
51
50
subtype : subType ,
You can’t perform that action at this time.
0 commit comments