Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/big-jobs-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/angular-pacer': minor
---

injectQueuedValue returns queued value instead of array
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ Consider using the `injectAsyncBatcher` function instead.

### options

`AsyncBatcherOptions`\<`TValue`\>
[`AngularAsyncBatcherOptions`](../interfaces/AngularAsyncBatcherOptions.md)\<`TValue`, \{
\}\>

## Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ Consider using the `injectAsyncDebouncer` function instead.

### options

`AsyncDebouncerOptions`\<`TFn`\>
[`AngularAsyncDebouncerOptions`](../interfaces/AngularAsyncDebouncerOptions.md)\<`TFn`, \{
\}\>

## Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The function returns a callable object:

### options

`AsyncQueuerOptions`\<`TValue`\> = `{}`
[`AngularAsyncQueuerOptions`](../interfaces/AngularAsyncQueuerOptions.md)\<`TValue`, `TSelected`\> = `{}`

### selector

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ Consider using the `injectAsyncRateLimiter` function instead.

### options

`AsyncRateLimiterOptions`\<`TFn`\>
[`AngularAsyncRateLimiterOptions`](../interfaces/AngularAsyncRateLimiterOptions.md)\<`TFn`, \{
\}\>

## Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ Consider using the `injectAsyncThrottler` function instead.

### options

`AsyncThrottlerOptions`\<`TFn`\>
[`AngularAsyncThrottlerOptions`](../interfaces/AngularAsyncThrottlerOptions.md)\<`TFn`, \{
\}\>

## Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ Consider using the `injectBatcher` function instead.

### options

`BatcherOptions`\<`TValue`\>
[`AngularBatcherOptions`](../interfaces/AngularBatcherOptions.md)\<`TValue`, \{
\}\>

## Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ Consider using the `injectDebouncer` function instead.

### options

`DebouncerOptions`\<`TFn`\>
[`AngularDebouncerOptions`](../interfaces/AngularDebouncerOptions.md)\<`TFn`, \{
\}\>

## Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Available debouncer state properties:

### initialOptions

`DebouncerOptions`\<`Setter`\<`TValue`\>\>
[`AngularDebouncerOptions`](../interfaces/AngularDebouncerOptions.md)\<`Setter`\<`TValue`\>, `TSelected`\>

### selector?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function injectDebouncedValue<TValue, TSelected>(
selector?): DebouncedSignal<TValue, TSelected>;
```

Defined in: [angular-pacer/src/debouncer/injectDebouncedValue.ts:77](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/debouncer/injectDebouncedValue.ts#L77)
Defined in: [angular-pacer/src/debouncer/injectDebouncedValue.ts:75](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/debouncer/injectDebouncedValue.ts#L75)

An Angular function that creates a debounced value that updates only after a specified delay.
Unlike injectDebouncedSignal, this function automatically tracks changes to the input signal
Expand Down Expand Up @@ -69,7 +69,7 @@ Available debouncer state properties:

#### initialOptions

`DebouncerOptions`\<`Setter`\<`TValue`\>\>
[`AngularDebouncerOptions`](../interfaces/AngularDebouncerOptions.md)\<`Setter`\<`TValue`\>, `TSelected`\>

#### selector?

Expand Down Expand Up @@ -119,7 +119,7 @@ function injectDebouncedValue<TValue, TSelected>(
selector?): DebouncedSignal<TValue, TSelected>;
```

Defined in: [angular-pacer/src/debouncer/injectDebouncedValue.ts:82](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/debouncer/injectDebouncedValue.ts#L82)
Defined in: [angular-pacer/src/debouncer/injectDebouncedValue.ts:80](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/debouncer/injectDebouncedValue.ts#L80)

An Angular function that creates a debounced value that updates only after a specified delay.
Unlike injectDebouncedSignal, this function automatically tracks changes to the input signal
Expand Down Expand Up @@ -178,7 +178,7 @@ Available debouncer state properties:

#### initialOptions

`DebouncerOptions`\<`Setter`\<`TValue`\>\>
[`AngularDebouncerOptions`](../interfaces/AngularDebouncerOptions.md)\<`Setter`\<`TValue`\>, `TSelected`\>

#### selector?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The function returns a callable object:

### options

`QueuerOptions`\<`TValue`\> = `{}`
[`AngularQueuerOptions`](../interfaces/AngularQueuerOptions.md)\<`TValue`, `TSelected`\> = `{}`

### selector

Expand Down
30 changes: 16 additions & 14 deletions docs/framework/angular/reference/functions/injectQueuedValue.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ title: injectQueuedValue
function injectQueuedValue<TValue, TSelected>(
value,
options?,
selector?): QueuedSignal<TValue, TSelected>;
selector?): QueuedValueSignal<TValue, TSelected>;
```

Defined in: [angular-pacer/src/queuer/injectQueuedValue.ts:31](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/queuer/injectQueuedValue.ts#L31)
Defined in: [angular-pacer/src/queuer/injectQueuedValue.ts:38](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/queuer/injectQueuedValue.ts#L38)

An Angular function that creates a queued value that processes state changes in order with an optional delay.
This function uses injectQueuedSignal internally to manage a queue of state changes and apply them sequentially.
Expand All @@ -23,9 +23,10 @@ The queued value will process changes in the order they are received, with optio
processing each change. This is useful for handling state updates that need to be processed
in a specific order, like animations or sequential UI updates.

The function returns a tuple containing:
- A Signal that provides the current queued value
- The queuer instance with control methods
The function returns a callable object containing:
- `queued()`: A signal-like function that provides the current queued value
- `queued.addItem(...)`: A method to enqueue additional values
- `queued.queuer`: The queuer instance with control methods and state

### Type Parameters

Expand All @@ -45,15 +46,15 @@ The function returns a tuple containing:

#### options?

`QueuerOptions`\<`TValue`\>
[`AngularQueuerOptions`](../interfaces/AngularQueuerOptions.md)\<`TValue`, `TSelected`\>

#### selector?

(`state`) => `TSelected`

### Returns

[`QueuedSignal`](../interfaces/QueuedSignal.md)\<`TValue`, `TSelected`\>
[`QueuedValueSignal`](../interfaces/QueuedValueSignal.md)\<`TValue`, `TSelected`\>

### Example

Expand All @@ -75,10 +76,10 @@ function injectQueuedValue<TValue, TSelected>(
value,
initialValue,
options?,
selector?): QueuedSignal<TValue, TSelected>;
selector?): QueuedValueSignal<TValue, TSelected>;
```

Defined in: [angular-pacer/src/queuer/injectQueuedValue.ts:42](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/queuer/injectQueuedValue.ts#L42)
Defined in: [angular-pacer/src/queuer/injectQueuedValue.ts:49](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/queuer/injectQueuedValue.ts#L49)

An Angular function that creates a queued value that processes state changes in order with an optional delay.
This function uses injectQueuedSignal internally to manage a queue of state changes and apply them sequentially.
Expand All @@ -87,9 +88,10 @@ The queued value will process changes in the order they are received, with optio
processing each change. This is useful for handling state updates that need to be processed
in a specific order, like animations or sequential UI updates.

The function returns a tuple containing:
- A Signal that provides the current queued value
- The queuer instance with control methods
The function returns a callable object containing:
- `queued()`: A signal-like function that provides the current queued value
- `queued.addItem(...)`: A method to enqueue additional values
- `queued.queuer`: The queuer instance with control methods and state

### Type Parameters

Expand All @@ -113,15 +115,15 @@ The function returns a tuple containing:

#### options?

`QueuerOptions`\<`TValue`\>
[`AngularQueuerOptions`](../interfaces/AngularQueuerOptions.md)\<`TValue`, `TSelected`\>

#### selector?

(`state`) => `TSelected`

### Returns

[`QueuedSignal`](../interfaces/QueuedSignal.md)\<`TValue`, `TSelected`\>
[`QueuedValueSignal`](../interfaces/QueuedValueSignal.md)\<`TValue`, `TSelected`\>

### Example

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ Consider using the `injectRateLimiter` function instead.

### options

`RateLimiterOptions`\<`TFn`\>
[`AngularRateLimiterOptions`](../interfaces/AngularRateLimiterOptions.md)\<`TFn`, \{
\}\>

## Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ full control over when your component tracks state changes.

### initialOptions

`RateLimiterOptions`\<`Setter`\<`TValue`\>\>
[`AngularRateLimiterOptions`](../interfaces/AngularRateLimiterOptions.md)\<`Setter`\<`TValue`\>, `TSelected`\>

### selector?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function injectRateLimitedValue<TValue, TSelected>(
selector?): RateLimitedSignal<TValue, TSelected>;
```

Defined in: [angular-pacer/src/rate-limiter/injectRateLimitedValue.ts:50](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/rate-limiter/injectRateLimitedValue.ts#L50)
Defined in: [angular-pacer/src/rate-limiter/injectRateLimitedValue.ts:48](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/rate-limiter/injectRateLimitedValue.ts#L48)

An Angular function that creates a rate-limited value that updates at most a certain number of times within a time window.
Unlike injectRateLimitedSignal, this function automatically tracks changes to the input signal
Expand Down Expand Up @@ -56,7 +56,7 @@ full control over when your component tracks state changes.

#### initialOptions

`RateLimiterOptions`\<`Setter`\<`TValue`\>\>
[`AngularRateLimiterOptions`](../interfaces/AngularRateLimiterOptions.md)\<`Setter`\<`TValue`\>, `TSelected`\>

#### selector?

Expand Down Expand Up @@ -93,7 +93,7 @@ function injectRateLimitedValue<TValue, TSelected>(
selector?): RateLimitedSignal<TValue, TSelected>;
```

Defined in: [angular-pacer/src/rate-limiter/injectRateLimitedValue.ts:55](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/rate-limiter/injectRateLimitedValue.ts#L55)
Defined in: [angular-pacer/src/rate-limiter/injectRateLimitedValue.ts:53](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/rate-limiter/injectRateLimitedValue.ts#L53)

An Angular function that creates a rate-limited value that updates at most a certain number of times within a time window.
Unlike injectRateLimitedSignal, this function automatically tracks changes to the input signal
Expand Down Expand Up @@ -139,7 +139,7 @@ full control over when your component tracks state changes.

#### initialOptions

`RateLimiterOptions`\<`Setter`\<`TValue`\>\>
[`AngularRateLimiterOptions`](../interfaces/AngularRateLimiterOptions.md)\<`Setter`\<`TValue`\>, `TSelected`\>

#### selector?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ Consider using the `injectThrottler` function instead.

### options

`ThrottlerOptions`\<`TFn`\>
[`AngularThrottlerOptions`](../interfaces/AngularThrottlerOptions.md)\<`TFn`, \{
\}\>

## Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Available throttler state properties:

### initialOptions

`ThrottlerOptions`\<`Setter`\<`TValue`\>\>
[`AngularThrottlerOptions`](../interfaces/AngularThrottlerOptions.md)\<`Setter`\<`TValue`\>, `TSelected`\>

### selector?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function injectThrottledValue<TValue, TSelected>(
selector?): ThrottledSignal<TValue, TSelected>;
```

Defined in: [angular-pacer/src/throttler/injectThrottledValue.ts:75](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/throttler/injectThrottledValue.ts#L75)
Defined in: [angular-pacer/src/throttler/injectThrottledValue.ts:73](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/throttler/injectThrottledValue.ts#L73)

An Angular function that creates a throttled value that updates at most once within a specified time window.
Unlike injectThrottledSignal, this function automatically tracks changes to the input signal
Expand Down Expand Up @@ -70,7 +70,7 @@ Available throttler state properties:

#### initialOptions

`ThrottlerOptions`\<`Setter`\<`TValue`\>\>
[`AngularThrottlerOptions`](../interfaces/AngularThrottlerOptions.md)\<`Setter`\<`TValue`\>, `TSelected`\>

#### selector?

Expand Down Expand Up @@ -118,7 +118,7 @@ function injectThrottledValue<TValue, TSelected>(
selector?): ThrottledSignal<TValue, TSelected>;
```

Defined in: [angular-pacer/src/throttler/injectThrottledValue.ts:80](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/throttler/injectThrottledValue.ts#L80)
Defined in: [angular-pacer/src/throttler/injectThrottledValue.ts:78](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/throttler/injectThrottledValue.ts#L78)

An Angular function that creates a throttled value that updates at most once within a specified time window.
Unlike injectThrottledSignal, this function automatically tracks changes to the input signal
Expand Down Expand Up @@ -178,7 +178,7 @@ Available throttler state properties:

#### initialOptions

`ThrottlerOptions`\<`Setter`\<`TValue`\>\>
[`AngularThrottlerOptions`](../interfaces/AngularThrottlerOptions.md)\<`Setter`\<`TValue`\>, `TSelected`\>

#### selector?

Expand Down
1 change: 1 addition & 0 deletions docs/framework/angular/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ title: "@tanstack/angular-pacer"
- [AsyncQueuedSignal](interfaces/AsyncQueuedSignal.md)
- [DebouncedSignal](interfaces/DebouncedSignal.md)
- [QueuedSignal](interfaces/QueuedSignal.md)
- [QueuedValueSignal](interfaces/QueuedValueSignal.md)
- [RateLimitedSignal](interfaces/RateLimitedSignal.md)
- [ThrottledSignal](interfaces/ThrottledSignal.md)

Expand Down
10 changes: 5 additions & 5 deletions docs/framework/angular/reference/interfaces/AsyncQueuedSignal.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Defined in: [angular-pacer/src/async-queuer/injectAsyncQueuedSignal.ts:10](https
### addItem()

```ts
addItem: (item, position?, runOnItemsChange?) => boolean;
addItem: (item, position, runOnItemsChange) => boolean;
```

Defined in: [angular-pacer/src/async-queuer/injectAsyncQueuedSignal.ts:11](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/async-queuer/injectAsyncQueuedSignal.ts#L11)
Expand All @@ -47,13 +47,13 @@ Items can be inserted based on priority or at the front/back depending on config

`TValue`

##### position?
##### position

`QueuePosition`
`QueuePosition` = `...`

##### runOnItemsChange?
##### runOnItemsChange

`boolean`
`boolean` = `true`

#### Returns

Expand Down
10 changes: 5 additions & 5 deletions docs/framework/angular/reference/interfaces/QueuedSignal.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Defined in: [angular-pacer/src/queuer/injectQueuedSignal.ts:7](https://github.co
### addItem()

```ts
addItem: (item, position?, runOnItemsChange?) => boolean;
addItem: (item, position, runOnItemsChange) => boolean;
```

Defined in: [angular-pacer/src/queuer/injectQueuedSignal.ts:8](https://github.com/TanStack/pacer/blob/main/packages/angular-pacer/src/queuer/injectQueuedSignal.ts#L8)
Expand All @@ -55,13 +55,13 @@ queuer.addItem('task2', 'front');

`TValue`

##### position?
##### position

`QueuePosition`
`QueuePosition` = `...`

##### runOnItemsChange?
##### runOnItemsChange

`boolean`
`boolean` = `true`

#### Returns

Expand Down
Loading