Is there a built-in function that converts Val{n} to n?

I am wondering if there is a built-in function that converts Val{n} to n? I typically need to convert Val’s to integers to name my simulation results properly. Usually, I add this function to my scripts:

value(::Val{n}) where n = n

I am wondering if there is an equivalent function in Base?

Grepping the Julia codebase I found this:

But we probably (well, certainly) aren’t meant to use it :smiley: