-
Notifications
You must be signed in to change notification settings - Fork 166
Open
Description
The README says that isColorSupported may be used as follows:
import pretty from 'pino-pretty'
if (pretty.isColorSupported) {
...
}However, doing so results in the following compile error:
TS2339: Property 'isColorSupported' does not exist on type 'typeof PinoPretty'.If I change to:
import { isColorSupported } from 'pino-pretty';
if (isColorSupported) {
...
}I get:
TS2693: 'isColorSupported' only refers to a type, but is being used as a value here.Changing either of those imports to a CommonJS require, as in either:
const pretty = require('pino-pretty');
// or
const { isColorSupported } = require('pino-pretty');works fine.
Metadata
Metadata
Assignees
Labels
No labels