export function last < T > ( arr ) { return arr [ arr . length - 1 ] ; } export function inherit ( ) { Array . prototype . last = function < T > ( ) : T | undefined { return last ( this as T [ ] ) ; } ; } export default last ;