To use omit
function from the Underscore library in TypeScript, you can follow the below steps:
index.ts23 chars2 lines
omit
function from the underscore library:index.ts35 chars2 lines
omit
function with the object you want to omit the properties from:index.ts98 chars3 lines
In the above example, omit
function is used to create a new object newObj
that omits the properties "age"
and "gender"
from the original object obj
.
Here is the full example code block:
index.ts185 chars7 lines
This is how you can use the omit
function from the Underscore library in TypeScript.
gistlibby LogSnag