Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): const consola = require('consola') type is wrong #80

Merged
merged 1 commit into from Dec 27, 2019

Conversation

Akryum
Copy link
Contributor

@Akryum Akryum commented Dec 26, 2019

Fix a typing issue that causes this to throw a typing error on consola.green:

// @ts-check

const consola = require('consola')

consola.green('foo')

@Akryum
Copy link
Contributor Author

Akryum commented Dec 26, 2019

Workaround:

// globals.d.ts

import { Consola } from 'consola'

declare module 'consola' {
  export = new Consola()
}

@pi0
Copy link
Member

pi0 commented Dec 31, 2019

I had to revert this PR as of #88. ==> #89

@Akryum
Copy link
Contributor Author

Akryum commented Dec 31, 2019

:|

nevilm-lt pushed a commit to nevilm-lt/consola that referenced this pull request Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants