Skip to content

Commit 5c22d8c

Browse files
Akryumpi0
authored andcommittedDec 27, 2019
fix(types): const consola = require('consola') type is wrong (#80)
1 parent 940474d commit 5c22d8c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎types/consola.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,5 @@ export declare class BrowserReporter implements ConsolaReporter {
9494
declare const consolaGlobalInstance: Consola;
9595

9696
export default consolaGlobalInstance
97+
98+
export = consolaGlobalInstance

3 commit comments

Comments
 (3)

jjelev commented on Dec 29, 2019

@jjelev

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 commented on Dec 31, 2019

@remipe-utbm

I have the exact same problem...

pi0 commented on Dec 31, 2019

@pi0
Member

Reverted in v2.11.3

Please sign in to comment.