2023-08-03 16:20:46 -05:00
|
|
|
package codersdk
|
2023-06-30 11:32:35 -04:00
|
|
|
|
|
|
|
|
type Buzz struct {
|
|
|
|
|
Foo `json:"foo"`
|
|
|
|
|
Bazz string `json:"bazz"`
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-15 08:46:10 -05:00
|
|
|
type Foo struct {
|
|
|
|
|
Bar string `json:"bar"`
|
2023-06-30 11:32:35 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type FooBuzz[R Custom] struct {
|
|
|
|
|
Something []R `json:"something"`
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-15 08:46:10 -05:00
|
|
|
type Custom interface {
|
|
|
|
|
Foo | Buzz
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-30 11:32:35 -04:00
|
|
|
// Not yet supported
|
|
|
|
|
//type FooBuzzMap[R Custom] struct {
|
|
|
|
|
// Something map[string]R `json:"something"`
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
// Not yet supported
|
|
|
|
|
//type FooBuzzAnonymousUnion[R Foo | Buzz] struct {
|
|
|
|
|
// Something []R `json:"something"`
|
|
|
|
|
//}
|