--pending-deprecation
触发挂起的弃用警告。
挂起的弃用通常与运行时弃用相同,但值得注意的是,它们默认关闭关闭,除非设置了 --pending-deprecation
命令行标志或 NODE_PENDING_DEPRECATION=1
环境变量,否则不会触发。
待弃用用于提供一种选择性的"早期警告"机制,开发者可以利用该机制来检测弃用的 API 的使用情况。
Emit pending deprecation warnings.
Pending deprecations are generally identical to a runtime deprecation with the
notable exception that they are turned off by default and will not be emitted
unless either the --pending-deprecation
command-line flag, or the
NODE_PENDING_DEPRECATION=1
environment variable, is set. Pending deprecations
are used to provide a kind of selective "early warning" mechanism that
developers may leverage to detect deprecated API usage.