Flow: [defs] zlib.constants is not defined

Created on 4 Sep 2017  路  3Comments  路  Source: facebook/flow

Node moved zlib's constants from under the zlib module to under zlib.constants e.g. zlib.Z_BEST_COMPRESSION is now zlib.constants.Z_BEST_COMPRESSION:

Note: Previously, the constants were available directly from require('zlib'), for instance zlib.Z_NO_FLUSH. Accessing the constants directly from the module is currently still possible but should be considered deprecated.

https://nodejs.org/api/zlib.html#zlib_constants

Flow's defs are here: https://github.com/facebook/flow/blob/master/lib/node.js#L1730. Probably could pull the fields out into a constants type and then intersect it into the zlib type for backwards compatibility.

Accepting PRs easy Library definitions help wanted

All 3 comments

I will take this one :)

Why wasn't this merged?

Oh idk I could look into this 馃憤

Was this page helpful?
0 / 5 - 0 ratings