SP.ClientRuntimeContext.castTo(obj, type) Method
Applies to: SharePoint Foundation 2010
In this article
Casts a specified client object to its derived type.
var value = SP.ClientRuntimeContext.castTo(obj, type);
The SP.ClientObject Class object that represents the client object to be cast to its derived type.
The object that represents the derived type of the provided client object.
This method casts the specified client object only to its derived client object; therefore, the destination object must also inherit from the SP.ClientObject Class.