Skip to content

W4104: Deprecated variant value used ​

Cause ​

The template sets a variant to a value the contract lists in "deprecatedValues". It still works; the warning carries the reason.

Example ​

text
// Tag.tess
<contract>
{ "name": "Tag", "role": "group", "parts": ["root"], "variants": { "tone": ["calm", "loud"] }, "deprecatedValues": { "tone": { "loud": "Use calm." } } }
</contract>
<template><div class="root"></div></template>

// app/pages/about.tess
<template><main><Tag tone="loud" /></main></template>

What you see ​

text
WARNING  W4104  app/pages/about.tess:1:28
  Tag.tone "loud" is deprecated: Use calm.
  Run `tessera explain W4104` for details.

Fix ​

Use the value the message names.

All errors and warnings