xpl / ololog

A better console.log for the log-driven debugging junkies
https://www.npmjs.com/package/ololog
The Unlicense
215 stars 8 forks source link

Typescript definition issues (time, methods) #29

Closed josesan9 closed 3 years ago

josesan9 commented 3 years ago

using the example log = log.configure ({ time: { yes: true, format: 'iso' } }) leads to a typescript issue as yes is not defined. It seems it is missing from the types definition

xpl commented 3 years ago

Could you please check if everything's OK now? It should be fixed in 1.1.166.

Recently-added locale and options also were missing, unfortunately — fixed it as well.

josesan9 commented 3 years ago

This has fixed it, thanks!

I've also come across an interesting one. When using the methods() function, you don't get back the additional methods. This could be fixed by changing the definition to the following: methods: <T>(newMethods: T) => this & T; and you would also need to change all of the returns for the other methods to return this instead of ololog e.g. configure (config: Config): this; I could raise a new ticket for this if you'd like.

xpl commented 3 years ago

I'll work on that later today, thanks! I've edited the title of the issue.

xpl commented 3 years ago

Should be now all fixed in 1.1.167

josesan9 commented 3 years ago

perfect! thanks