The expected type of the input to the method.
The expected type of the output of the method.
The expected type of the authentication context.
Optional
ensuresAn array of post-conditions that must pass after the method executes successfully.
Optional
invariantsAn array of invariant conditions that must hold true before and after method execution.
Optional
layerThe layer of the application where the contract is applied (e.g., "presentation", "action", "business", "data", "unknown", "test").
Optional
requiresAn array of pre-conditions that must pass before the method executes.
Optional
retryThe maximum number of retry attempts for recoverable errors. Defaults to 0 (no retries).
Optional
retryThe delay in milliseconds between retry attempts. Defaults to 100ms.
Optional
retryAn array of ErrorCategory values that should trigger a retry.
If not provided, it will retry on errors where isRecoverable
is true.
Options for the
@contract
decorator.