Skip to content

Commit

Permalink
Fix typescript defs
Browse files Browse the repository at this point in the history
  • Loading branch information
theogravity committed Mar 22, 2020
1 parent 4f9554d commit 2d2d101
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

```sh
# v4 of sqlite is targted for nodejs 10 and on.
$ npm install [email protected].1 --save
$ npm install [email protected].4 --save

# If you need a legacy version for an older version of nodejs
# install v3 instead, and look at the v3 branch readme for usage details
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sqlite",
"version": "4.0.0-beta.1",
"version": "4.0.0-beta.4",
"description": "SQLite client for Node.js applications with SQL-based migrations API written in Typescript",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
6 changes: 0 additions & 6 deletions src/interfaces/Sqlite3.interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,3 @@ export namespace Sqlite3 {
changes?: number
}
}

declare module 'sqlite3' {
interface Database {
loadExtension(path: string, callback?: (err) => void)
}
}
3 changes: 3 additions & 0 deletions src/sqlite3/Sqlite3Database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ export class Sqlite3Database {
*/
loadExtension (path: string) {
return new Promise((resolve, reject) => {
// @todo if anyone can augment the typescript defs for loadExtension
// feel free to open a PR!
// @ts-ignore
this.db.loadExtension(path, err => {
if (err) {
return reject(err)
Expand Down

0 comments on commit 2d2d101

Please sign in to comment.