Skip to content

Commit

Permalink
chore: fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Feb 15, 2023
1 parent 51a82eb commit effae7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/proxy/array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ export function proxifyArrayElements<T extends object>(
);
}

export function proxifyArray<T extends object>(node: ESNode): Proxified<T> {
export function proxifyArray<T>(node: ESNode): Proxified<T> {
if (!("elements" in node)) {
return undefined as any;
}
return proxifyArrayElements(node, node.elements as any);
return proxifyArrayElements(node, node.elements as any) as any;
}
4 changes: 2 additions & 2 deletions src/proxy/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ESNode } from "../types";
import { literalToAst, createProxy, proxify } from "./_utils";
import { Proxified } from "./types";

export function proxifyObject<T extends object>(node: ESNode): Proxified<T> {
export function proxifyObject<T>(node: ESNode): Proxified<T> {
if (!("properties" in node)) {
return undefined as any;
}
Expand Down Expand Up @@ -78,5 +78,5 @@ export function proxifyObject<T extends object>(node: ESNode): Proxified<T> {
};
},
}
);
) as Proxified<T>;
}

0 comments on commit effae7c

Please sign in to comment.