[typescript] const consola = require('consola') type is wrong
pi0 opened this issue · comments
Ref: #80
Fix a typing issue that causes this to throw a typing error on
consola.green
:
// @ts-check
const consola = require('consola')
consola.green('foo')
Workaround:
// globals.d.ts
import { Consola } from 'consola'
declare module 'consola' {
export = new Consola()
}
should be fixed in v3