You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flow points out that documents is an array of nullable elements and filteredDocuments is an array of non-null elements, which requires a filter/refinement in order to satisfy that type constraint
Actual behavior
Flow emits an error that looks like:
56: .filter((document) => {
^ Cannot call `documents.filter(...).filter` because property `name` is missing in function [1] but exists in statics of `Boolean` [2]. [incompatible-call]
References:
56: .filter((document) => {
^ [1]
[LIB] ..//flow/v0.201.0/flowlib/core.js:367: declare class Boolean {
This seems related to filter being an overloaded method type to support both .filter(Boolean) and the usual callback definitions, but this error makes it difficult to find the root cause of the issue. Annotating the filter callback params doesn't seem to fix that either.
Flow version: 0.201.0
Expected behavior
Flow points out that
documents
is an array of nullable elements andfilteredDocuments
is an array of non-null elements, which requires a filter/refinement in order to satisfy that type constraintActual behavior
Flow emits an error that looks like:
This seems related to
filter
being an overloaded method type to support both.filter(Boolean)
and the usual callback definitions, but this error makes it difficult to find the root cause of the issue. Annotating thefilter
callback params doesn't seem to fix that either.The text was updated successfully, but these errors were encountered: