From 908d597f81ad622e1e3aa004a63b9467b544ebe1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 20 Nov 2022 14:15:30 +0000 Subject: [PATCH 1/2] chore(deps): update dependency @types/node to v18 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8b248af..83f10d5 100644 --- a/package.json +++ b/package.json @@ -13,12 +13,12 @@ "author": "", "license": "MIT", "peerDependencies": { - "@types/node": "^16.11.0", + "@types/node": "^18.0.0", "typescript": "^4.4.4" }, "devDependencies": { "@types/jest": "^27.0.0", - "@types/node": "^16.11.0", + "@types/node": "^18.0.0", "fake-indexeddb": "^3.1.4", "jest": "^27.0.0", "ts-jest": "^27.0.7", From 375a20b2d155f63c542384b2e336d1eabb791cfe Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 20 Nov 2022 14:16:16 +0000 Subject: [PATCH 2/2] Commit from GitHub Actions (Compile TS and run tests) --- lib/driver/indexeddb.config.d.ts | 4 ++-- lib/driver/indexeddb.config.js | 6 +++--- lib/driver/indexeddb.decorator.d.ts | 4 ++-- lib/repositories/interfaces.d.ts | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/driver/indexeddb.config.d.ts b/lib/driver/indexeddb.config.d.ts index 2eb9716..1846433 100644 --- a/lib/driver/indexeddb.config.d.ts +++ b/lib/driver/indexeddb.config.d.ts @@ -1,9 +1,9 @@ -export declare type TStoreIndex = { +export type TStoreIndex = { name: string; keyPath?: string | string[]; options?: IDBIndexParameters; }; -export declare type TStoreParameters = IDBObjectStoreParameters & { +export type TStoreParameters = IDBObjectStoreParameters & { database: string; name?: string; indices?: Array; diff --git a/lib/driver/indexeddb.config.js b/lib/driver/indexeddb.config.js index 23df055..c5f6297 100644 --- a/lib/driver/indexeddb.config.js +++ b/lib/driver/indexeddb.config.js @@ -11,9 +11,6 @@ var __rest = (this && this.__rest) || function (s, e) { }; import { getCollectedMetaInfo } from "./indexeddb.decorator"; export class StoreConfig { - constructor() { - this.storeConfig = new IDBStoreConfig(StoreConfig.NAME_DB_DEFAULT); - } static get NAME_DB_DEFAULT() { return StoreConfig.__DEFAULT_DB_NAME; } @@ -23,6 +20,9 @@ export class StoreConfig { this.getInstance().storeConfig.switchDatabase(databaseName); } ; + constructor() { + this.storeConfig = new IDBStoreConfig(StoreConfig.NAME_DB_DEFAULT); + } static getInstance() { if (!StoreConfig.instance) StoreConfig.init(); diff --git a/lib/driver/indexeddb.decorator.d.ts b/lib/driver/indexeddb.decorator.d.ts index 1e5e829..17a77c1 100644 --- a/lib/driver/indexeddb.decorator.d.ts +++ b/lib/driver/indexeddb.decorator.d.ts @@ -1,5 +1,5 @@ -declare type ClassDecoratorFactory = (...args: any) => (constructor: Function) => any; -declare type PropertyDecoratorFactory = (...args: any) => (target: any, propertyKey: string) => any; +type ClassDecoratorFactory = (...args: any) => (constructor: Function) => any; +type PropertyDecoratorFactory = (...args: any) => (target: any, propertyKey: string) => any; interface IStoreDecorator extends ClassDecoratorFactory { (args: { name?: string; diff --git a/lib/repositories/interfaces.d.ts b/lib/repositories/interfaces.d.ts index 7958fff..5181737 100644 --- a/lib/repositories/interfaces.d.ts +++ b/lib/repositories/interfaces.d.ts @@ -1,4 +1,4 @@ -export declare type Newable = { +export type Newable = { new (...args: any[]): T; }; export interface IRead {