--pending-deprecation


触发挂起的弃用警告。

【Emit pending deprecation warnings.】

待弃用通常与运行时弃用完全相同,其显著区别在于,默认情况下它们是关闭的,并且不会被触发,除非设置了 --pending-deprecation 命令行标志或 NODE_PENDING_DEPRECATION=1 环境变量。待弃用用于提供一种选择性的“提前警告”机制,开发者可以利用它来检测已弃用的 API 使用情况。

【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.】