File tree 3 files changed +24
-31
lines changed
3 files changed +24
-31
lines changed Original file line number Diff line number Diff line change 3
3
"version" : " 1.4.1" ,
4
4
"description" : " A very simple \" database\" on the file system for when you're too small to fail." ,
5
5
"main" : " index.js" ,
6
- "types" : " types/stubdb .d.ts" ,
6
+ "types" : " types/index .d.ts" ,
7
7
"scripts" : {
8
8
"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" ,
10
10
"tscheck" : " npm run tscheck-client" ,
11
11
"lint" : " npx eslint api.js table.js test.js" ,
12
12
"check" : " npm run lint && npm run tscheck"
Original file line number Diff line number Diff line change
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
+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments