Skip to content

util: allow deprecate on classes

Rodrigo Muino Tomonari requested to merge github/fork/vdeturckheim/master into master
Checklist
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
  • util
Description of change

Classes objects cannot be called without new. util.deprecate executes 'fn.apply'. Classes cannot be deprecated with util.deprecate.

This uses 'new.target' to detect (when process is defined) calls to constructor to allow deprecate on class.

Merge request reports

Loading