Skip to content

trying to silence third-party errors with [declarations] seems to re-raise ignored errors instead #6717

@timri

Description

@timri

I try to use flow in my project and suppress errors from dependencies.
My project uses react-native-firebase, when I run flow I get 3 errors inside node_modules/react-native-firebase.
I wanted to silence them and have extended the .flowconfig with

[declarations]
.*/node_modules/react-native-firebase/.*

But now I get new errors, which are normally silenced, for example:

Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/react-native-firebase/dist/modules/firestore/DocumentReference.js.flow:54:53

Cannot call CollectionReference with parentPath bound to collectionPath because null [1] is incompatible with Path [2].

     node_modules/react-native-firebase/dist/modules/firestore/DocumentReference.js.flow
     51│   get parent(): CollectionReference {
     52│     const parentPath = this._documentPath.parent();
     53│     // $FlowExpectedError: parentPath can never be null
     54│     return new CollectionReference(this._firestore, parentPath);
     55│   }
     56│
     57│   get path(): string {

     node_modules/react-native-firebase/dist/modules/firestore/CollectionReference.js.flow
 [2] 29│   constructor(firestore: Firestore, collectionPath: Path) {

     node_modules/react-native-firebase/dist/modules/firestore/Path.js.flow
 [1] 36│   parent(): Path | null {

The 3 original errors are also still reported.

I am running flow 0.78.0

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions