To use the now
function from the underscore library in TypeScript, you first need to install the library:
23 chars2 lines
Then, in your TypeScript file, you can import the now
function from the library like this:
index.ts138 chars5 lines
The now
function returns the current timestamp in milliseconds using the Date
object. You can use this function in your TypeScript project to get the current time or to measure the performance of parts of your code.
gistlibby LogSnag