Skip to content

Commit 6b779dd

Browse files
committed
-
1 parent 184eb7e commit 6b779dd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/build/patches.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { parse, type Value, type Node, type Document } from "kdljs";
1+
import { parse, type Value, type Node } from "kdljs";
22
import 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) {

0 commit comments

Comments
 (0)