| title | BCP062 |
|---|---|
| description | The referenced declaration with name <type-name> is not valid. |
| ms.topic | reference |
| ms.custom | devx-track-bicep |
| ms.date | 10/30/2025 |
This diagnostic occurs when the referenced declaration has an error.
The referenced declaration with name <type-name> is not valid.
Error
The following example raises the diagnostic because the referenced user-defined data type has an error:
type ball = object.bar
output tennisBall ball = {
name: 'tennis'
color: 'yellow'
}You can fix the diagnostic by fixing the ball definition:
type ball = object
output tennisBall ball = {
name: 'tennis'
color: 'yellow'
}For more information about Bicep diagnostics, see Bicep core diagnostics.