Skip to content

Commit

Permalink
fix: code improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
elribonazo committed Sep 27, 2024
1 parent 12274bd commit 2b3da92
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ fi
cd ts
rm -rf build && node esbuild.config.mjs
npx dts-bundle-generator src/index.ts --no-check -o ./build/index.d.ts
npx dts-bundle-generator src/index.ts --no-check -o ./build/esm/index.d.ts
npx dts-bundle-generator src/index.ts --no-check -o ./build/cjs/index.d.ts

26 changes: 26 additions & 0 deletions ts/tests/schemas.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,32 @@ import { describe, it, expect } from 'vitest';
import { SchemaFieldType, RIDB, RIDBTypes, BaseStorage } from "@elribonazo/ridb";

export class InMemory<T extends RIDBTypes.SchemaType> extends BaseStorage<T> {
constructor(
public name: string,
public schema: RIDBTypes.Schema<T>
) {
super(name, schema)
}

close(): Promise<void> {
throw new Error('Method not implemented.');
}

count(query: RIDBTypes.QueryType<T>): Promise<number> {
throw new Error('Method not implemented.');
}
findDocumentById(id: string): Promise<RIDBTypes.Doc<T> | null> {
throw new Error('Method not implemented.');
}
find(query: RIDBTypes.QueryType<T>): Promise<RIDBTypes.Doc<T>[]> {
throw new Error('Method not implemented.');
}
remove(id: string): Promise<void> {
throw new Error('Method not implemented.');
}
write(op: RIDBTypes.Operation<T>): Promise<RIDBTypes.Doc<T>> {
throw new Error('Method not implemented.');
}

}

Expand Down

0 comments on commit 2b3da92

Please sign in to comment.