# Extract type name only from parametric type

**URL:** <https://discourse.julialang.org/t/extract-type-name-only-from-parametric-type/14188>\
**Category:** General Usage\
**Tags:** question, parametric-types\
**Created:** [August 28, 2018, 12:55pm UTC](https://discourse.julialang.org/t/extract-type-name-only-from-parametric-type/14188 "2018-08-28T12:55:22Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [August 29, 2018, 12:24pm UTC](https://discourse.julialang.org/t/extract-type-name-only-from-parametric-type/14188/19 "2018-08-29T12:24:23Z")

</div>

Just in case I was not clear, I meant to use `.wrapper` and adapt the code from Jameson’s comment as follows:

```julia
name(::Type{T}) where {T} = (isempty(T.parameters) ? T : T.name.wrapper)

```

Sorry should have been more clear.

---

_[View the full topic](https://discourse.julialang.org/t/extract-type-name-only-from-parametric-type/14188)._
