# Public interface to get all type parameters?

**URL:** https://discourse.julialang.org/t/public-interface-to-get-all-type-parameters/119514
**Category:** General Usage
**Tags:** parametric-types
**Created:** [September 17, 2024, 6:50pm UTC](https://discourse.julialang.org/t/public-interface-to-get-all-type-parameters/119514 "2024-09-17T18:50:10Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![eldee](https://avatars.discourse-cdn.com/v4/letter/e/b5a626/32.png) [@eldee](https://discourse.julialang.org/u/eldee)
#### Post date: [September 17, 2024, 7:06pm UTC](https://discourse.julialang.org/t/public-interface-to-get-all-type-parameters/119514/2 "2024-09-17T19:06:14Z")

</div>

I might misunderstand the question, but would something like

```julia-repl
julia> struct S{T1, T2} end

julia> get_parameters(::S{T1, T2}) where {T1, T2} = (T1, T2)
get_parameters (generic function with 1 method)

julia> s = S{Float32, UInt64}()
S{Float32, UInt64}()

julia> get_parameters(s)
(Float32, UInt64)

```

not work? (By the way, my suggestion here is very similar to [a post of @sylvaticus](https://discourse.julialang.org/t/get-the-type-parameters-of-a-parametric-type/113308/4) in the first topic thread you linked.)

---

_[View the full topic](https://discourse.julialang.org/t/public-interface-to-get-all-type-parameters/119514)._
