We removed Promise.prototype.done
a while back because it's not actually in the JS spec. The hacky workaround for getting it back would be to copy the promise definition here into your own libdef file.
Specifically: Copy it (only the declare class Promise { ... }
definition) into some file called, say, promise-override.js
and put that file into a directory called flow-typed
in the same directory as your .flowconfig
file. From there you can update your override to include a definition for done()
.
(The flow-typed
directory is a special directory that Flow assumes contains library definitions if it exists)