baryon/tracer

Example of how to use tracer with TypeScript

Open

#139 aperta il 20 mag 2023

Vedi su GitHub
 (3 commenti) (1 reazione) (0 assegnatari)JavaScript (124 fork)batch import
help wanted

Metriche repository

Star
 (1137 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

I see type definitions in the package, but when I try to import and use this way:

import { colorConsole } from 'tracer'

const logger = colorConsole({})
console.error('some error')

It says Property 'error' does not exist on type 'Logger<"error">.

Can you provide some simple example of how to properly import and use tracer with TypeScript?

Thanks!

Guida contributor