hashicorp / hashicorp/terraform-plugin-framework
Consider types Package Alias for basetypes.ObjectAsOptions
- Dominant language
- Go
- Stars
- 384
- Forks
- 107
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
### Module version
```
v1.2.0
```
### Use-cases
When calling the `(types.Object).As()` method (really the `(basetypes.ObjectValue).As()` method 😉 ), the third parameter is `basetypes.ObjectAsOptions`. However, unlike everything else for framework-defined types which are aliased in the `types` package, the `ObjectAsOptions` type is not aliased, which means developers need to unexpectedly import the `basetypes` package as well (typically only needed for implementing custom value types). It's a minor annoyance, but since we already did all the work to alias everything else, it seems like this should be included for consistency or to at least reduce some potential confusion about the "new" import.
### Proposal
In the `types` package, add:
```go
// Copied Go documentation...
type ObjectAsOptions = basetypes.ObjectAsOptions
```
Double check that website documentation which uses `types` everywhere else switches to `types.ObjectAsOptions` for consistency.
Contributor guide
Assessment
This issue has not been assessed yet.