Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeListToStringSlice should only be allowed to be called on string lists #173

Open
ligfx opened this issue Oct 23, 2024 · 1 comment
Open

Comments

@ligfx
Copy link
Contributor

ligfx commented Oct 23, 2024

Coming out of #172TypeListToStringSlice can currently be called on a types.List value with any internal element type. How can we make this more type-safe? Ideally this function is only ever called on types.List values that actually hold strings.

I saw another Terraform provider (was it Cloudflare's? hmm.) that had an interesting solution that defines generics that wrap types.List but also hold type information, and defines strongly-typed functions on those.

@ligfx
Copy link
Contributor Author

ligfx commented Oct 23, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant