bicep icon indicating copy to clipboard operation
bicep copied to clipboard

'Go to definition' for user-defined type properties

Open levimatheri opened this issue 4 months ago • 0 comments

Is your feature request related to a problem? Please describe. For user-defined types, 'Go to definition' currently only works for the type itself, but not for the associated properties:

param person **Person** = { // ctrl-click here takes you to the `type Person` definition
  **name**: { // ctrl-click here has no effect
    value: 'Alice'
  }
  age: 30
}

resource sa 'Microsoft.Storage/storageAccounts@2023-04-01' existing = {
  name: person.name.**value** // ctrl-click here has no effect
}

type Person = {
  name: Name
  age: int
} 

type Name = {
  value: string
}

Describe the solution you'd like It would be nice to add 'Go to definition' (Ctrl-click) for UDT type properties, which would be especially useful for deeply nested properties within other UDTs and for properties of imported UDTs.

levimatheri avatar Sep 30 '24 19:09 levimatheri