Skip to content

Commit d1f3c67

Browse files
committed
"ok"
1 parent cc56c08 commit d1f3c67

File tree

3 files changed

+24
-31
lines changed

3 files changed

+24
-31
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"version": "1.4.1",
44
"description": "A very simple \"database\" on the file system for when you're too small to fail.",
55
"main": "index.js",
6-
"types": "types/stubdb.d.ts",
6+
"types": "types/index.d.ts",
77
"scripts": {
88
"test": "node -r esm test.js",
9-
"tscheck-client": "tsc --declaration --types node --target ES2020 --checkJs --allowJs --outFile typetests/client.js --module System test.js decs.d.ts",
9+
"tscheck-client": "tsc --declaration --types node --target ES2020 --checkJs --allowJs --outFile typetests/client.js --module System api.js decs.d.ts",
1010
"tscheck": "npm run tscheck-client",
1111
"lint": "npx eslint api.js table.js test.js",
1212
"check": "npm run lint && npm run tscheck"

types/index.d.ts

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
declare module "stubdb" {
2+
export class Table {
3+
constructor(tableInfo: any);
4+
tableInfo: any;
5+
base: string;
6+
put(key: any, record: any, greenlights?: any): void;
7+
get(key: any, greenlights?: any): any;
8+
getAll(greenlights?: any): any[];
9+
}
10+
export class IndexedTable extends Table {
11+
constructor(tableInfo: any);
12+
getAllMatchingKeysFromIndex(propName: any, value: any): any;
13+
getAllMatchingRecordsFromIndex(propName: any, value: any): any[][];
14+
}
15+
export function config({ root: root }?: {
16+
root?: string;
17+
}): void;
18+
export function getTable(name: any): Table;
19+
export function getIndexedTable(name: any, indexed_properties?: any[]): IndexedTable;
20+
export function rebuildIndexedTable(name: any, indexed_properties: any): void;
21+
export function dropTable(name: any): void;
22+
}

types/stubdb.d.ts

-29
This file was deleted.

0 commit comments

Comments
 (0)