Skip to content

Stable API to strip type parameters from type #35543

Open

Description

Is there a function to strip the type parameters from a type? For example:

strip_type_parameters(Array{Int,3}) # should return Array

There is one way to do this but it is not documented (pointed out by @jakobnissen):

strip_type_parameters(T) = Base.typename(T).wrapper

Therefore in principle it can change in future versions.

Why not have a stable API for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    featureIndicates new feature / enhancement requestshelp wantedIndicates that a maintainer wants help on an issue or pull request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions