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.

Usage with Typescript

See original GitHub issue

Can’t seem to use this library with Typescript cause it looks like the DefinitelyTyped definitions are out of date (don’t know if you maintain those or not): https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/knex-postgis

For reference, this is the type error:

Argument of type 'Knex<any, unknown[]>' is not assignable to parameter of type 'Knex'.
  Property 'clone' is missing in type 'Knex<any, unknown[]>' but required in type 'Knex'.

Usage:

const db = knex({ dialect: "postgres" })
const st = knexPostgis(db)

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
jfgodoycommented, Nov 15, 2019

I just publish v0.10.0 which includes basic support for typescript. I will close this issue for now, but feel free to open it if you have any problem with the new release.

1reaction
jfgodoycommented, Nov 12, 2019

hi guys, I created a pull request #37 that adds basic support for typescript. To my understanding this will fix this issue. I would like you to review this PR and comment it if it is good enough before merge. You have more experience working with typescript so I would thank you if you can help me to improve the solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Usage With TypeScript - Redux
TypeScript is a typed superset of JavaScript that provides compile-time checking of source code. When used with Redux, TypeScript can help ...
Read more >
TypeScript: JavaScript With Syntax For Types.
TypeScript extends JavaScript by adding types to the language. TypeScript speeds up your development experience by catching errors and providing fixes ...
Read more >
Documentation - TypeScript for JavaScript Programmers
TypeScript knows the JavaScript language and will generate types for you in many cases. For example in creating a variable and assigning it...
Read more >
Documentation - The Basics - TypeScript
An editor that supports TypeScript can deliver “quick fixes” to automatically fix errors, refactorings to easily re-organize code, and useful navigation ...
Read more >
The starting point for learning TypeScript
... Module: Plugin · Module: Class · Module: Function · Global .d.ts · Global: Modifying Module · Do's and Don'ts · Deep Dive...
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