Syntax Lookup

Enter some language construct you want to know more about.

@dead / @@dead

These decorators suppress dead-code reports.

@dead is picked up by reanalyze's dead code analysis, and suppresses reporting on the value/type, but can also be used to force the analysis to consider a value as dead. Typically used to acknowledge cases of dead code you are not planning to address right now, but can be searched easily later.

Since ReScript 12.2, standalone @@dead suppresses reports for all following items in the current file or module until another scoped annotation overrides it:

RES
module DeferredCleanup = { @@dead let oldParser = input => input let oldSerializer = value => value }

Unlike @@live, suppressed items aren't liveness roots and don't keep their dependencies alive.

References