provides
provides
Legacy section. provides is the original input/output contract syntax with nested inputs and outputs blocks. It is still accepted by the parser for backward compatibility, but the canonical replacements are accepts (for inputs) and responds with (for outputs). Run mashin fmt to auto-migrate.
When to use
Do not use provides in new code. Use accepts and responds with instead.
The parser accepts provides with nested inputs and outputs blocks and will continue to do so during the migration period. If you encounter provides in existing .mashin files, either rewrite it manually or run mashin fmt to convert automatically.
Syntax (legacy)
provides inputs message as text, is required priority as text, default: "medium" outputs team as text confidence as decimalCanonical replacement
accepts message as text, is required priority as text, default: "medium"
responds with team as text confidence as decimalThe canonical form is one nesting level flatter. accepts and responds with are top-level section verbs, while provides > inputs and provides > outputs required an extra level of indentation.
Migration
The mashin fmt formatter automatically converts:
// Before (legacy)provides inputs name as text, is required outputs greeting as text
// After (canonical)accepts name as text, is required
responds with greeting as textField declarations, types, and modifiers are preserved exactly. Only the section structure changes.
Translations
| Language | Keyword |
|---|---|
| English | provides |
| Spanish | provee |
| French | fournit |
| German | bietet |
| Japanese | 提供 |
| Chinese | 提供 |
| Korean | 제공 |
See also
- accepts - Canonical input contract declaration
- responds with - Canonical output contract declaration