How do you get the output type from a powershell script with System.Management.Automation?

I am trying to figure out how to get the type specified in a powershell script [OutputType([int])] for example.
I can find it in the parsed attributes but it's just treated as an attribute that has "[int]", so it's not seen as a type but just the string value.
But there seems to be a OutputTypeAttribute class, but i can't find any information on how to get a hold of that.
Was this page helpful?