Closed Phoenixmatrix closed 2 years ago
I have the same question. I'm trying to add a polyfill into Array
, and flow throws me an error.
if (!Array.prototype.find) {
Array.prototype.find = function(predicate) { ... }
}
Error:
inconsistent use of library definitions
4: Array.prototype.find = function(predicate) {
^^^^ property `find`. Covariant property `find` incompatible with contravariant use in. See lib: animate/lib/Array.jsfl:4
4: Array.prototype.find = function(predicate) {
^^^^^^^^^^^^^^^^^^^^ assignment of property `find`. See lib: animate/lib/Array.jsfl:4
More of a question than an issue. If I was to make a custom RxJS operator, that lived in a separate library and augments the prototype...what would the definition file for that look like? I've tried various ways of augmenting existing def with no luck.