castErased
Validates and casts one erased provider value for this key.
The runtime invokes the selected provider and then calls this narrow bridge. This function uses this key's class token to validate and cast the value without changing it.
Return
the value checked against this key's runtime type.
Parameters
value
the current provider value at the erased runtime boundary.
Throws
when value is outside this key's runtime type.