Deprecations

Functions and other definitions can be marked as deprecated using the @deprecated attribute.

関数やその他の定義は、@deprecated 属性を使用して非推奨とマークすることができます。

If a deprecated function is reference the compiler will emit a warning, letting the programmer know they ought to update their code.

非推奨の関数が参照されている場合、コンパイラは警告を発し、プログラマにコードを更新すべきことを知らせます。

The deprecation attribute takes a message and this will be displayed to the user in the warning. In the message explain to the user the new approach or replacement function, or direct them on documentation on how to upgrade.

deprecation 属性はメッセージを受け取り、警告の中でユーザにそのメッセージが表示されます。メッセージの中で、新しいアプローチや代替関数をユーザに説明したり、アップグレード方法に関するドキュメントを案内したりします。