Skip to content

Commit

Permalink
avoid @ts-ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
RamIdeas committed Jul 30, 2024
1 parent d044599 commit a454995
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/miniflare/src/workers/core/proxy.worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,12 @@ function isPlainObject(value: unknown) {
Object.getOwnPropertyNames(proto).sort().join("\0") === objectProtoNames
);
}
function objectContainsFunctions(obj: Record<string, unknown>): boolean {
function objectContainsFunctions(obj: Record<string | symbol, unknown>): boolean {
const propertyNames = Object.getOwnPropertyNames(obj);
const propertySymbols = Object.getOwnPropertySymbols(obj);
const properties = [...propertyNames, ...propertySymbols];

for (const property of properties) {
// @ts-ignore - ignoring the following line since TypeScript seems to
// incorrectly error if `property` is a symbol
// (see: https://github.com/Microsoft/TypeScript/issues/24587)
const entry = obj[property];
if (typeof entry === "function") {
return true;
Expand Down

0 comments on commit a454995

Please sign in to comment.