Skip to content

Commit 037a473

Browse files
authored
ensure TypeScript definitions are sound during testing (#201)
1 parent df6c040 commit 037a473

File tree

3 files changed

+16
-27
lines changed

3 files changed

+16
-27
lines changed

lib/nano.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ declare namespace nano {
304304
find(query: MangoQuery, callback?: Callback<MangoResponse<D>>): Promise <MangoResponse<D>>;
305305
server: ServerScope;
306306
//https://docs.couchdb.org/en/latest/partitioned-dbs/index.html
307-
partitionInfo(partitionKey: string, callback?: Callback<PartitionInfoResponse<D>>): Promise <PartitionInfoResponse>;
307+
partitionInfo(partitionKey: string, callback?: Callback<PartitionInfoResponse>): Promise <PartitionInfoResponse>;
308308
partitionedList(partitionKey: string, params?: DocumentListParams, callback?: Callback<DocumentListResponse<D>>): Promise<DocumentListResponse<D>>;
309309
partitionedListAsStream(partitionKey: string, params?: DocumentListParams): Request;
310310
partitionedFind(partitionKey: string, query: MangoQuery, callback?: Callback<MangoResponse<D>>): Promise <MangoResponse<D>>;
@@ -1083,8 +1083,8 @@ declare namespace nano {
10831083

10841084
// Partition sizes
10851085
sizes: {
1086-
active: integer;
1087-
external: integer;
1086+
active: number;
1087+
external: number;
10881088
}
10891089

10901090
// Partition name

package-lock.json

Lines changed: 9 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
"request": "^2.88.0"
2525
},
2626
"devDependencies": {
27-
"async": "^2.6.2",
2827
"jest": "^25.1.0",
2928
"nock": "^11.7.2",
30-
"standard": "^14.3.1"
29+
"standard": "^14.3.1",
30+
"typescript": "^3.7.5"
3131
},
3232
"scripts": {
3333
"standard": "standard --fix",
34-
"test": "standard && npm run jest",
34+
"test": "standard && tsc lib/nano.d.ts && npm run jest",
3535
"jest": "jest test/* --coverage"
3636
},
3737
"main": "./lib/nano.js",
@@ -40,9 +40,7 @@
4040
"node": ">=10"
4141
},
4242
"pre-commit": [
43-
"mocked",
44-
"test",
45-
"checkcoverage"
43+
"test"
4644
],
4745
"standard": {
4846
"env": [

0 commit comments

Comments
 (0)