To use the dropright
function from the Lodash library in TypeScript, you need to:
index.ts26 chars2 lines
dropright
function from the Lodash library and its type definitions:index.ts67 chars3 lines
dropright
function to remove the last n elements from an array:index.ts212 chars8 lines
The List
type definition imported from Lodash is used to ensure that the input array and the output array have the same type.
gistlibby LogSnag