The @deprecated
decorator is used to add deprecation notes to types, values and submodules. The compiler and editor tooling will yield a warning whenever a deprecated entity is being used.
Alternatively, use the @@deprecated
decorator to add a deprecation warning to the file level.
@deprecated
type person = {id: int, name: string}
@deprecated
let customDouble = n => n * 2
@deprecated("Use OtherModule.customTriple instead")
let customTriple = n => n * 3
@deprecated("Use OtherModule instead")
module MyModule = {
type t
}