File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1- import { parse , type Value , type Node , type Document } from "kdljs" ;
1+ import { parse , type Value , type Node } from "kdljs" ;
22import type {
33 Enum ,
44 Event ,
@@ -95,11 +95,11 @@ function handleTypeParameters(value: Value) {
9595/**
9696 * Converts parsed KDL Document nodes to match the [types](types.d.ts).
9797 */
98- function convertKDLNodes ( nodes : Node [ ] | Document ) : DeepPartial < WebIdl > {
98+ function convertKDLNodes ( nodes : Node [ ] ) : DeepPartial < WebIdl > {
9999 // Accept either Document or array of nodes
100100 const actualNodes : Node [ ] = Array . isArray ( nodes )
101101 ? nodes
102- : ( nodes as Document ) ;
102+ : nodes ;
103103
104104 const enums : Record < string , Enum > = { } ;
105105 const mixin : Record < string , DeepPartial < Interface > > = { } ;
@@ -385,7 +385,7 @@ async function getAllFileURLs(folder: URL): Promise<URL[]> {
385385/**
386386 * Read and parse a single KDL file into its KDL Document structure.
387387 */
388- async function readPatchDocument ( fileUrl : URL ) : Promise < Document > {
388+ async function readPatchDocument ( fileUrl : URL ) : Promise < Node [ ] > {
389389 const text = await readFile ( fileUrl , "utf8" ) ;
390390 const { output, errors } = parse ( text ) ;
391391 if ( errors . length ) {
You can’t perform that action at this time.
0 commit comments