import SlothData from '../models/SlothData' ; import { inspect } from 'util' ; param obj typeparam private export default function getSlothData < S > ( obj ) { const wrapped = obj as { sloth : SlothData < S > ; } ; if ( ! wrapped . sloth ) { throw new Error ( `Class ${ wrapped } does not extend SlothEntity` ) ; } return wrapped . sloth ; }