Closed marco-ippolito closed 3 weeks ago
Review requested:
I haven't been following these deprecations — how do users do runtime type checks now?
For reference, when I added KeyObject
, the constructor was intentionally not exposed. Later, users requested that it be exposed, primarily for type checking. (It still cannot be instantiated using the public constructor, though.)
I haven't been following these deprecations — how do users do runtime type checks now?
For reference, when I added
KeyObject
, the constructor was intentionally not exposed. Later, users requested that it be exposed, primarily for type checking. (It still cannot be instantiated using the public constructor, though.)
Duck typing, at least this is what has been suggested for fs
classes like fs.Stats
.
Issue is that we are exposing the old constructor without new
keyword and it prevents refactoring to es6
classes.
I'm working on the refactor in a follow up pr
I'm not against leaving it for type cheking but prevent it from being instanciated
now that I think about it, we can avoid removing it completely, closing I'll do it in a follow up
Removes the public constructor of
Hash
andHmac