live-cache 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,8 +7,8 @@ interface ControllerOptions {
7
7
  store?: ObjectStore;
8
8
  withInvalidation?: boolean;
9
9
  }
10
- export interface UseControllerResult<TVariable, TName extends string> {
11
- controller: Controller<TVariable, TName>;
10
+ export interface UseControllerResult<TVariable, TName extends string, TController extends Controller<TVariable, TName>> {
11
+ controller: TController;
12
12
  data: ModelType<TVariable>[];
13
13
  loading: boolean;
14
14
  error: unknown;
@@ -38,5 +38,5 @@ export interface UseControllerResult<TVariable, TName extends string> {
38
38
  * );
39
39
  * ```
40
40
  */
41
- export default function useController<TVariable, TName extends string>(name: TName, where?: string | Partial<TVariable>, options?: ControllerOptions): UseControllerResult<TVariable, TName>;
41
+ export default function useController<TVariable, TName extends string, TController extends Controller<TVariable, TName>>(controllerInstance: TController, where?: string | Partial<TVariable>, options?: ControllerOptions): UseControllerResult<TVariable, TName, TController>;
42
42
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "live-cache",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "A client-side cache + controller library for stateful resources",
5
5
  "repository": {
6
6
  "type": "git",