question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Typescript definition issues (time, methods)

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
josesan9commented, Feb 24, 2021

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.

0reactions
josesan9commented, Feb 24, 2021

perfect! thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Methods for TypeScript runtime type checking - LogRocket Blog
Explore five methods of performing TypeScript type checks at runtime in this post and learn each of their advantages and disadvantages.
Read more >
Documentation - The Basics - TypeScript
When we run our code, the way that our JavaScript runtime chooses what to do is by figuring out the type of the...
Read more >
Add plugins methods to typescript definition #364 - GitHub
Should plugins's api methods be added in the core d.ts file? Or they should have their owns? If they have their own, they...
Read more >
Surviving the TypeScript Ecosystem — Part 4 - Medium
I will try to update examples from time-to-time with TypeScript updates. ... TypeScript there is a module called “lodash” and that it has...
Read more >
typescript-cheatsheet - GitHub Pages
Modules are executed within their own scope, not in the global scope; this means that variables, functions, classes, etc. declared in a module...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found