asWorkletSession

Adapts this ChildSession to a WorkletSession. If the attached target is not of a compatible type, this function throws an exception.