We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
instanceof Array
Array.isArray()
1 parent 64f159c commit 38b266dCopy full SHA for 38b266d
packages/format/src/types/program/context.ts
@@ -89,7 +89,7 @@ export namespace Context {
89
90
export const isPick = (value: unknown): value is Pick =>
91
typeof value === "object" && !!value &&
92
- "pick" in value && value.pick instanceof Array &&
+ "pick" in value && Array.isArray(value.pick) &&
93
value.pick.every(isContext);
94
95
export interface Gather {
@@ -98,7 +98,7 @@ export namespace Context {
98
99
export const isGather = (value: unknown): value is Gather =>
100
101
- "gather" in value && value.gather instanceof Array &&
+ "gather" in value && Array.isArray(value.gather) &&
102
value.gather.every(isContext);
103
104
export interface Frame {
0 commit comments