Skip to content

Commit

Permalink
fix(types): const consola = require('consola') type is wrong (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum authored and pi0 committed Dec 27, 2019
1 parent 940474d commit 5c22d8c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions types/consola.d.ts
Expand Up @@ -94,3 +94,5 @@ export declare class BrowserReporter implements ConsolaReporter {
declare const consolaGlobalInstance: Consola;

export default consolaGlobalInstance

export = consolaGlobalInstance

3 comments on commit 5c22d8c

@jjelev
Copy link

@jjelev jjelev commented on 5c22d8c Dec 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work

 ERROR  ERROR in ./node_modules/consola/types/consola.d.ts(98,1):                                                          nuxt:typescript 11:30:28
98:1 An export assignment cannot be used in a module with other exported elements.
    96 | export default consolaGlobalInstance
    97 | 
  > 98 | export = consolaGlobalInstance
       | ^
    99 | 

ℹ Version: typescript 3.7.4                                                                                                                                nuxt:typescript 11:30:28
ℹ Time: 15081ms                                                                                                                                            nuxt:typescript 11:30:28
ℹ Waiting for file changes                                                                                                                                                 11:30:28
ℹ Memory usage: 638 MB (RSS: 1.23 GB) 

@remipe-utbm
Copy link

@remipe-utbm remipe-utbm commented on 5c22d8c Dec 31, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the exact same problem...

@pi0
Copy link
Member

@pi0 pi0 commented on 5c22d8c Dec 31, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in v2.11.3

Please sign in to comment.