@ngx-signal-store-query/core
Advanced tools
Comparing version 0.4.0 to 0.5.0
{ | ||
"name": "@ngx-signal-store-query/core", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Signal Store feature that bridges with Angular Query", | ||
@@ -28,6 +28,6 @@ "keywords": [ | ||
"peerDependencies": { | ||
"@angular/common": "^18.0.0 || >=19.0.0", | ||
"@angular/core": "^18.0.0 || >=19.0.0", | ||
"@ngrx/signals": "^18.0.0 || >=19.0.0", | ||
"@tanstack/angular-query-experimental": ">=5.61.0" | ||
"@angular/common": "^19.0.0 || >=20.0.0 || next", | ||
"@angular/core": "^19.0.0 || >=20.0.0 || next", | ||
"@ngrx/signals": "^19.0.0 || >=20.0.0 || next", | ||
"@tanstack/angular-query-experimental": "^5.61.0" | ||
}, | ||
@@ -34,0 +34,0 @@ "module": "fesm2022/ngx-signal-store-query-core.mjs", |
@@ -1,11 +0,9 @@ | ||
import { type Prettify, type SignalStoreFeatureResult, type StateSignals, type WritableStateSource } from '@ngrx/signals'; | ||
import { type CreateMutationResult, type CreateQueryOptions, type CreateQueryResult, type injectMutation, type QueryKey } from '@tanstack/angular-query-experimental'; | ||
export type QueryStore<Input extends SignalStoreFeatureResult> = Prettify<StateSignals<Input['state']> & Input['computed'] & Input['methods'] & WritableStateSource<Prettify<Input['state']>>>; | ||
export type CreateQueryFn<TDataFn = unknown, TError = Error, TData = TDataFn, TQueryKey extends QueryKey = QueryKey, Input extends SignalStoreFeatureResult = SignalStoreFeatureResult> = (store: QueryStore<Input>) => () => CreateQueryOptions<TDataFn, TError, TData, TQueryKey>; | ||
import { type SignalStoreFeatureResult, type withProps } from '@ngrx/signals'; | ||
import { type CreateQueryOptions, type injectMutation, type QueryKey } from '@tanstack/angular-query-experimental'; | ||
export type StoreType<Input extends SignalStoreFeatureResult, Props extends object> = Parameters<Parameters<typeof withProps<Input, Props>>[0]>[0]; | ||
export type QueryProp<Name extends string> = `${Uncapitalize<Name>}Query`; | ||
export type QueryMethod<TData = unknown, TError = Error> = (() => CreateQueryResult<TData, TError>) & CreateQueryResult<TData, TError>; | ||
export type CreateQueryFn<Name extends string, TDataFn = unknown, TError = Error, TData = TDataFn, TQueryKey extends QueryKey = QueryKey, Input extends SignalStoreFeatureResult = SignalStoreFeatureResult> = (store: StoreType<Input, Record<QueryProp<Name>, unknown>>) => () => CreateQueryOptions<TDataFn, TError, TData, TQueryKey>; | ||
type CreateMutationOptions<TData = unknown, TError = Error, TVariables = void, TContext = unknown> = ReturnType<NonNullable<Parameters<typeof injectMutation<TData, TError, TVariables, TContext>>[0]>>; | ||
export type CreateMutationFn<TData = unknown, TError = Error, TVariables = void, TContext = unknown, Input extends SignalStoreFeatureResult = SignalStoreFeatureResult> = (store: QueryStore<Input>) => () => CreateMutationOptions<TData, TError, TVariables, TContext>; | ||
export type MutationProp<Name extends string> = `${Uncapitalize<Name>}Mutation`; | ||
export type MutationMethod<TData = unknown, TError = Error, TVariables = void, TContext = unknown> = (() => CreateMutationResult<TData, TError, TVariables, TContext>) & CreateMutationResult<TData, TError, TVariables, TContext>; | ||
export type CreateMutationFn<Name extends string, TData = unknown, TError = Error, TVariables = void, TContext = unknown, Input extends SignalStoreFeatureResult = SignalStoreFeatureResult> = (store: StoreType<Input, Record<MutationProp<Name>, unknown>>) => () => CreateMutationOptions<TData, TError, TVariables, TContext>; | ||
export {}; |
@@ -1,5 +0,8 @@ | ||
import { type EmptyFeatureResult, type SignalStoreFeature, type SignalStoreFeatureResult } from '@ngrx/signals'; | ||
import { type CreateMutationFn, type MutationMethod, type MutationProp } from './types'; | ||
export declare const withMutation: <Name extends string, TData = unknown, TError = Error, TVariables = void, TContext = unknown, Input extends SignalStoreFeatureResult = SignalStoreFeatureResult>(name: Name, createMutationFn: CreateMutationFn<TData, TError, TVariables, TContext, NoInfer<Input>>) => SignalStoreFeature<Input, EmptyFeatureResult & { | ||
methods: Record<MutationProp<NoInfer<Name>>, MutationMethod<NoInfer<TData>, NoInfer<TError>, NoInfer<TVariables>, NoInfer<TContext>>>; | ||
import { type SignalStoreFeatureResult } from '@ngrx/signals'; | ||
import { type CreateMutationResult } from '@tanstack/angular-query-experimental'; | ||
import { type CreateMutationFn } from './types'; | ||
export declare const withMutation: <Name extends string, TData = unknown, TError = Error, TVariables = void, TContext = unknown, Input extends SignalStoreFeatureResult = SignalStoreFeatureResult, Props extends object = Record<`${Uncapitalize<Name>}Mutation`, CreateMutationResult<TData, TError, TVariables, TContext>>>(name: Name, createMutationFn: CreateMutationFn<Name, TData, TError, TVariables, TContext, Input>) => import("@ngrx/signals").SignalStoreFeature<Input, { | ||
state: {}; | ||
props: Props; | ||
methods: {}; | ||
}>; |
@@ -1,6 +0,8 @@ | ||
import { type EmptyFeatureResult, type SignalStoreFeature, type SignalStoreFeatureResult } from '@ngrx/signals'; | ||
import { type QueryKey } from '@tanstack/angular-query-experimental'; | ||
import { type CreateQueryFn, type QueryMethod, type QueryProp } from './types'; | ||
export declare const withQuery: <Name extends string, TDataFn = unknown, TError = Error, TData = TDataFn, TQueryKey extends QueryKey = QueryKey, Input extends SignalStoreFeatureResult = SignalStoreFeatureResult>(name: Name, createQueryFn: CreateQueryFn<TDataFn, TError, TData, TQueryKey, NoInfer<Input>>) => SignalStoreFeature<Input, EmptyFeatureResult & { | ||
methods: Record<QueryProp<NoInfer<Name>>, QueryMethod<NoInfer<TData>, NoInfer<TError>>>; | ||
import { type SignalStoreFeatureResult } from '@ngrx/signals'; | ||
import { type CreateQueryResult, type QueryKey } from '@tanstack/angular-query-experimental'; | ||
import { type CreateQueryFn } from './types'; | ||
export declare const withQuery: <Name extends string, TDataFn = unknown, TError = Error, TData = TDataFn, TQueryKey extends QueryKey = QueryKey, Input extends SignalStoreFeatureResult = SignalStoreFeatureResult, Props extends object = Record<`${Uncapitalize<Name>}Query`, CreateQueryResult<TData, TError>>>(name: Name, createQueryFn: CreateQueryFn<Name, TDataFn, TError, TData, TQueryKey, Input>) => import("@ngrx/signals").SignalStoreFeature<Input, { | ||
state: {}; | ||
props: Props; | ||
methods: {}; | ||
}>; |
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
12205
73