@furystack/repository
Advanced tools
Comparing version 6.1.15 to 6.1.16
{ | ||
"name": "@furystack/repository", | ||
"version": "6.1.15", | ||
"version": "6.1.16", | ||
"description": "Repository implementation for FuryStack", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -0,1 +1,2 @@ | ||
import type { WithOptionalId } from '@furystack/core' | ||
import { StoreManager } from '@furystack/core' | ||
@@ -20,3 +21,6 @@ import type { Constructable } from '@furystack/inject' | ||
public getDataSetFor<T, TPrimaryKey extends keyof T>(model: Constructable<T>, primaryKey: TPrimaryKey) { | ||
public getDataSetFor<T, TPrimaryKey extends keyof T, TWritableData = WithOptionalId<T, TPrimaryKey>>( | ||
model: Constructable<T>, | ||
primaryKey: TPrimaryKey, | ||
) { | ||
const instance = this.dataSets.get(model) | ||
@@ -29,3 +33,3 @@ if (!instance) { | ||
} | ||
return instance as DataSet<T, TPrimaryKey> | ||
return instance as unknown as DataSet<T, TPrimaryKey, TWritableData> | ||
} | ||
@@ -32,0 +36,0 @@ public createDataSet<T, TPrimaryKey extends keyof T>( |
@@ -0,1 +1,2 @@ | ||
import type { WithOptionalId } from '@furystack/core'; | ||
import type { Constructable } from '@furystack/inject'; | ||
@@ -11,3 +12,3 @@ import type { Disposable } from '@furystack/utils'; | ||
private dataSets; | ||
getDataSetFor<T, TPrimaryKey extends keyof T>(model: Constructable<T>, primaryKey: TPrimaryKey): DataSet<T, TPrimaryKey, import("@furystack/core").WithOptionalId<T, TPrimaryKey>>; | ||
getDataSetFor<T, TPrimaryKey extends keyof T, TWritableData = WithOptionalId<T, TPrimaryKey>>(model: Constructable<T>, primaryKey: TPrimaryKey): DataSet<T, TPrimaryKey, TWritableData>; | ||
createDataSet<T, TPrimaryKey extends keyof T>(model: Constructable<T>, primaryKey: TPrimaryKey, settings?: Partial<DataSetSettings<T, TPrimaryKey>>): this; | ||
@@ -14,0 +15,0 @@ private readonly storeManager; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147592
1785