1
1
import { parse } from "kdljs" ;
2
- import { Enum , Event , Method , Property } from "./types" ;
2
+ import { Enum } from "./types" ;
3
3
import { readdir , readFile } from "fs/promises" ;
4
4
import { merge } from "./helpers.js" ;
5
5
6
- interface MethodDescriptor {
7
- [ x : string ] : Omit < Method , "signature" > ;
8
- }
9
-
10
6
interface EnumDescriptor {
11
7
[ x : string ] : Enum ;
12
8
}
13
- interface PropertyDescriptor {
14
- [ x : string ] : Omit < Property , "type" > ;
15
- }
16
-
17
- interface InterfaceMixin {
18
- [ x : string ] : {
19
- events ?: { event : Event [ ] } ;
20
- methods ?: { method : MethodDescriptor } ;
21
- } ;
22
- }
23
9
24
10
/**
25
11
* Converts patch files in KDL to match the [types](types.d.ts).
@@ -33,7 +19,6 @@ export function parseKDL(kdlText: string) {
33
19
34
20
const nodes = output ! ;
35
21
const enums : EnumDescriptor = { } ;
36
- const interfaces : InterfaceMixin = { } ;
37
22
38
23
for ( const node of nodes ) {
39
24
if ( node . name === "enum" ) {
@@ -58,7 +43,7 @@ export function parseKDL(kdlText: string) {
58
43
}
59
44
}
60
45
61
- return { mixins : { mixin : interfaces } , enums : { enum : enums } } ;
46
+ return { enums : { enum : enums } } ;
62
47
}
63
48
64
49
/**
0 commit comments