Skip to content

[ENHANCEMENT] Introduce get_type_parameters to access unspecified type parameters #17

@mtfishman

Description

@mtfishman

For example:

get_type_parameters(Matrix) == (TypeVar(:T), 2) # This equality technically doesn't hold because `TypeVar(:T) ≠ TypeVar(:T)`
get_type_parameters(Matrix, 1) == TypeVar(:T) # This equality technically doesn't hold because `TypeVar(:T) ≠ TypeVar(:T)`
get_type_parameters(Matrix, 1, nothing) == nothing # Set a default value to use if unspecified

This would act as a public API for the private functionality TypeParameters.parameters, and serves as an unchecked version of type_parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions