-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
77 lines (64 loc) · 2.21 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
export const version: string;
export const startedAt: number;
interface optionType{
clearOnStart?: boolean,
filename?: string
}
interface readOptionType{
table?: string
}
type data = boolean | string | number | object | any[]
interface keyValue{
key: string,
value: data
}
export function set(key: string, value: data): void;
export function get(key: string): data;
export function fetch(key: string): data;
export function all(): keyValue[];
export function startsWith(search: string): keyValue[];
export function has(key: string): boolean;
export function type(key: string): any;
export function add(key: string, amount: number): void;
export function subtract(key: string, amount: number): void;
export function push(key: string, value: data): void;
export function includes(key: string, value: data): boolean;
export function is(key: string, value: data): boolean;
export function options(options: optionType): void;
export function deleteAll(): void;
export function importQuick(data: keyValue[]): void;
function imp(data: keyValue[]): void;
function del(key: string): void;
export { del as delete };
export { imp as import };
export class Table{
public constructor(tablename: string, options?: optionType);
public tablename: string;
public startedAt: number;
public options: any;
public filename: string;
public base: any;
public set(key: string, value: data): void;
public get(key: string): data;
public fetch(key: string): data;
public all(): keyValue[];
public startsWith(search: string): keyValue[];
public has(key: string): boolean;
public type(key: string): any;
public add(key: string, amount: number): void;
public subtract(key: string, amount: number): void;
public push(key: string, value: data): void;
public includes(key: string, value: data): boolean;
public is(key: string, value: data): boolean;
public import(data: keyValue[]): void;
public delete(key: string): void;
public deleteAll(): void;
public importQuick(data: keyValue[]): void;
}
export class Read{
constructor(filename: string, options?: readOptionType);
public filename: string;
public options: any;
public base: any;
public get(): any[];
}