Skip to content

Fix angular input + API consistency#161

Open
benjavicente wants to merge 7 commits intoTanStack:mainfrom
benjavicente:fix-angular-input
Open

Fix angular input + API consistency#161
benjavicente wants to merge 7 commits intoTanStack:mainfrom
benjavicente:fix-angular-input

Conversation

@benjavicente
Copy link

@benjavicente benjavicente commented Feb 22, 2026

🎯 Changes

This PR does 2 things, both in injectQueuedValue:

  • value could be called on component initialization, causing injectQueuedValue to throw. I added a tests first to demonstrate the issue and then I added a commit to fix it. There was an example that tested against that error, but where the path where of the value() call wasn't reached (maybeSelector is not undefined).

    protected readonly queued = injectQueuedValue(this.value, null, { wait: 500 }, (state) => ({
    items: state.items,
    }))
    >(
    value: Signal<TValue>,
    initialValueOrOptions?: TValue | QueuerOptions<TValue>,
    initialOptionsOrSelector?:
    | QueuerOptions<TValue>
    | ((state: QueuerState<TValue>) => TSelected),
    maybeSelector?: (state: QueuerState<TValue>) => TSelected,
    ): QueuedSignal<TValue, TSelected> {
    const hasSelector = typeof initialOptionsOrSelector === 'function'
    const hasInitialValue =
    (initialOptionsOrSelector !== undefined && !hasSelector) ||
    maybeSelector !== undefined
    const initialValue = hasInitialValue
    ? (initialValueOrOptions as TValue)
    : value()

  • The injectQueuedValue was returning an array instead of a queued value. I guess that was a mistake, so I aligned the function to behave similar to the React api.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • New Features

    • Updated injectQueuedValue API: Returns a callable queued value object with built-in addItem() method and queuer property for queue management, replacing the previous tuple-based return type.
  • Documentation

    • Updated reference documentation for the new injectQueuedValue return type and usage patterns.
  • Tests

    • Added comprehensive test suite for the updated functionality.

@changeset-bot
Copy link

changeset-bot bot commented Feb 22, 2026

🦋 Changeset detected

Latest commit: e2eb851

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@tanstack/angular-pacer Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@benjavicente benjavicente marked this pull request as ready for review February 22, 2026 21:12
@nx-cloud
Copy link

nx-cloud bot commented Feb 27, 2026

View your CI Pipeline Execution ↗ for commit c8d1f5f

Command Status Duration Result
nx run-many --targets=build --exclude=examples/** ✅ Succeeded 18s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-27 19:14:20 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 27, 2026

More templates

@tanstack/angular-pacer

npm i https://pkg.pr.new/@tanstack/angular-pacer@161

@tanstack/pacer

npm i https://pkg.pr.new/@tanstack/pacer@161

@tanstack/pacer-devtools

npm i https://pkg.pr.new/@tanstack/pacer-devtools@161

@tanstack/pacer-lite

npm i https://pkg.pr.new/@tanstack/pacer-lite@161

@tanstack/preact-pacer

npm i https://pkg.pr.new/@tanstack/preact-pacer@161

@tanstack/preact-pacer-devtools

npm i https://pkg.pr.new/@tanstack/preact-pacer-devtools@161

@tanstack/react-pacer

npm i https://pkg.pr.new/@tanstack/react-pacer@161

@tanstack/react-pacer-devtools

npm i https://pkg.pr.new/@tanstack/react-pacer-devtools@161

@tanstack/solid-pacer

npm i https://pkg.pr.new/@tanstack/solid-pacer@161

@tanstack/solid-pacer-devtools

npm i https://pkg.pr.new/@tanstack/solid-pacer-devtools@161

commit: acc7d9f

@theVedanta
Copy link
Contributor

theVedanta commented Mar 3, 2026

ahh makes sense. Thank you for fixing this, I had missed it

@KevinVandy
Copy link
Member

I'll get this in soon

@theVedanta
Copy link
Contributor

My effort to resolve the lockfile in the UI was a bad commit. Can you please resolve them locally?

@coderabbitai
Copy link

coderabbitai bot commented Mar 14, 2026

📝 Walkthrough

Walkthrough

This pull request introduces a breaking API change to the @tanstack/angular-pacer package. The injectQueuedValue function now returns a QueuedValueSignal—a callable object with addItem() method and queuer property—instead of QueuedSignal. Supporting infrastructure includes new test suites, TypeScript configuration reorganization, updated examples, and documentation.

Changes

Cohort / File(s) Summary
API Definition & Types
packages/angular-pacer/src/queuer/injectQueuedValue.ts
Introduces new QueuedValueSignal<TValue, TSelected> interface and changes injectQueuedValue return type from QueuedSignal to QueuedValueSignal. Uses linkedSignal internally and exposes addItem and queuer via Object.assign to create a callable object enriched with control properties.
Interface Documentation
docs/framework/angular/reference/interfaces/QueuedValueSignal.md, docs/framework/angular/reference/interfaces/AsyncQueuedSignal.md, docs/framework/angular/reference/interfaces/QueuedSignal.md
New documentation for QueuedValueSignal interface. Updates AsyncQueuedSignal and QueuedSignal to make addItem() parameters (position and runOnItemsChange) required instead of optional.
Function Documentation & Reference Index
docs/framework/angular/reference/functions/injectQueuedValue.md, docs/framework/angular/reference/index.md, .changeset/big-jobs-call.md
Updates function documentation to reflect new QueuedValueSignal return type and callable object structure. Adds changeset documenting the minor release and API change. Adds reference entry for QueuedValueSignal interface.
Example Code
examples/angular/injectQueuedValue/src/app/app.html, examples/angular/injectQueuedValue/src/app/app.ts, examples/angular/injectQueuedValue/src/app/inputapp.ts
Updates template bindings and component code to use new QueuedValueSignal API; queue length now accessed via queued.queuer.state().items.length instead of queued() function call.
Test Infrastructure
packages/angular-pacer/tests/queuer/injectQueuedValue.spec.ts, packages/angular-pacer/tests/test-setup.ts
Adds comprehensive test suite for injectQueuedValue covering basic usage, queue behavior, timing with fake timers, and Angular component integration. Introduces test setup file for TestBed initialization.
TypeScript Configuration
packages/angular-pacer/tsconfig.json, packages/angular-pacer/tsconfig.base.json, packages/angular-pacer/tsconfig.lib.json, packages/angular-pacer/tsconfig.spec.json, packages/angular-pacer/tsconfig.docs.json
Reorganizes TypeScript configuration from single file to project references structure. Introduces base config and separates library, spec, and docs configurations with appropriate compiler options.
Build & Development Configuration
packages/angular-pacer/eslint.config.js, packages/angular-pacer/package.json, packages/angular-pacer/vitest.config.ts, packages/angular-pacer/tsdown.config.ts
Adds ESLint TypeScript project parsing configuration. Updates dependencies: adds @analogjs/vite-plugin-angular, @analogjs/vitest-angular, @angular/compiler, and jsdom. Updates Vitest to use Angular plugin, switch test environment to jsdom, and include test setup file.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

Poem

🐰 The queue now speaks with voice sublime,
A callable that queues in time,
With addItem and queuer to command,
This signal change reshapes the land,
Angular pacers skip and bound! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main changes: fixing an Angular input error and aligning the injectQueuedValue API with React consistency.
Description check ✅ Passed The PR description comprehensively covers both main changes with context, references, and completed checklist items matching the template requirements.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can customize the tone of the review comments and chat replies.

Configure the tone_instructions setting to customize the tone of the review comments and chat replies. For example, you can set the tone to Act like a strict teacher, Act like a pirate and more.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/angular-pacer/src/queuer/injectQueuedValue.ts (1)

75-92: ⚠️ Potential issue | 🟠 Major

The 2-arg initialValue overload has a runtime detection bug.

Line 77 never marks hasInitialValue for the 2-arg form injectQueuedValue(signal, initialValue), so the initial value is treated as options (line 81) and skipped (line 91). This contradicts the overload declared at lines 49–60.

While the codebase currently uses only the 3-arg form injectQueuedValue(signal, options) with full test coverage, the dormant 2-arg overload exposes an API that breaks at runtime. Fix by either (a) correcting the detection logic to distinguish TValue from QueuerOptions, or (b) removing the unused 2-arg overload.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/angular-pacer/src/queuer/injectQueuedValue.ts` around lines 75 - 92,
The runtime detection for the 2-arg overload is wrong; change the
hasInitialValue check to detect when the second argument (initialValueOrOptions)
is present and is not a function (i.e. typeof initialValueOrOptions !==
'function') instead of inspecting initialOptionsOrSelector — update
hasInitialValue to: (initialValueOrOptions !== undefined && typeof
initialValueOrOptions !== 'function') || maybeSelector !== undefined, and keep
the subsequent uses of initialOptions, selector, and queuedValue (symbols:
initialOptionsOrSelector, maybeSelector, initialValueOrOptions, hasInitialValue,
initialOptions, selector, queuedValue, injectQueuedValue) consistent with that
corrected detection so the 2-arg overload treats the second param as the initial
TValue rather than options.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/framework/angular/reference/interfaces/AsyncQueuedSignal.md`:
- Line 36: The addItem signature in the AsyncQueuedSignal interface should mark
the position and runOnItemsChange parameters as optional to match the
implementation; update the type signature for addItem to use position? and
runOnItemsChange? and update the corresponding parameter documentation entries
for position and runOnItemsChange in the AsyncQueuedSignal doc block so they
indicate optionality and align with packages/pacer/src/async-queuer.ts behavior.

In `@docs/framework/angular/reference/interfaces/QueuedSignal.md`:
- Line 36: Update the documented TypeScript signatures in the QueuedSignal
interface to mark parameters with defaults as optional: change addItem's
signature to reflect that position and runOnItemsChange are optional (with
defaults coming from packages/pacer/src/queuer.ts) and update the parameter
headers/descriptions accordingly; apply the same optional-parameter adjustments
to the other documented methods referenced around lines 58-64 so the docs match
the implementation in queuer.ts and clearly state default values for those
optional parameters.

In `@docs/framework/angular/reference/interfaces/QueuedValueSignal.md`:
- Around line 46-50: The example under the QueuedValueSignal interface uses the
wrong receiver name; update the usage examples to call queued.addItem(...)
instead of queuer.addItem(...). Locate the example block showing addItem and
replace calls to queuer.addItem with queued.addItem so the documented API
(QueuedValueSignal and its addItem method) matches actual usage.

In `@packages/angular-pacer/tsconfig.json`:
- Around line 3-5: The referenced tsconfig files (tsconfig.lib.json and
tsconfig.spec.json) are missing the required composite setting for TypeScript
project references; add "compilerOptions": { "composite": true } to both
tsconfig.lib.json and tsconfig.spec.json so they declare composite mode
(ensuring they can be referenced by the root tsconfig.json "references" array
and allowing tsc --build to succeed).

In `@packages/angular-pacer/tsconfig.spec.json`:
- Line 4: Update the test TypeScript config so it doesn't emit declaration
files: in tsconfig.spec.json change the compiler option "noEmit" from false to
true to override the root "declaration": true and prevent tsc from emitting
.d.ts during vitest runs; locate the "noEmit" setting in tsconfig.spec.json and
set it to true.

---

Outside diff comments:
In `@packages/angular-pacer/src/queuer/injectQueuedValue.ts`:
- Around line 75-92: The runtime detection for the 2-arg overload is wrong;
change the hasInitialValue check to detect when the second argument
(initialValueOrOptions) is present and is not a function (i.e. typeof
initialValueOrOptions !== 'function') instead of inspecting
initialOptionsOrSelector — update hasInitialValue to: (initialValueOrOptions !==
undefined && typeof initialValueOrOptions !== 'function') || maybeSelector !==
undefined, and keep the subsequent uses of initialOptions, selector, and
queuedValue (symbols: initialOptionsOrSelector, maybeSelector,
initialValueOrOptions, hasInitialValue, initialOptions, selector, queuedValue,
injectQueuedValue) consistent with that corrected detection so the 2-arg
overload treats the second param as the initial TValue rather than options.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 54576736-ac89-4730-81f5-a1148dfce5e4

📥 Commits

Reviewing files that changed from the base of the PR and between f04f730 and e2eb851.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (21)
  • .changeset/big-jobs-call.md
  • docs/framework/angular/reference/functions/injectQueuedValue.md
  • docs/framework/angular/reference/index.md
  • docs/framework/angular/reference/interfaces/AsyncQueuedSignal.md
  • docs/framework/angular/reference/interfaces/QueuedSignal.md
  • docs/framework/angular/reference/interfaces/QueuedValueSignal.md
  • examples/angular/injectQueuedValue/src/app/app.html
  • examples/angular/injectQueuedValue/src/app/app.ts
  • examples/angular/injectQueuedValue/src/app/inputapp.ts
  • packages/angular-pacer/eslint.config.js
  • packages/angular-pacer/package.json
  • packages/angular-pacer/src/queuer/injectQueuedValue.ts
  • packages/angular-pacer/tests/queuer/injectQueuedValue.spec.ts
  • packages/angular-pacer/tests/test-setup.ts
  • packages/angular-pacer/tsconfig.base.json
  • packages/angular-pacer/tsconfig.docs.json
  • packages/angular-pacer/tsconfig.json
  • packages/angular-pacer/tsconfig.lib.json
  • packages/angular-pacer/tsconfig.spec.json
  • packages/angular-pacer/tsdown.config.ts
  • packages/angular-pacer/vitest.config.ts


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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Implementation (defaulted params) ==="
sed -n '470,477p' packages/pacer/src/async-queuer.ts
sed -n '9,15p' packages/angular-pacer/src/async-queuer/injectAsyncQueuedSignal.ts

echo
echo "=== Current docs (required params) ==="
rg -n -C2 'addItem: \(item, position, runOnItemsChange\) => boolean;|##### position\??|##### runOnItemsChange\??' \
  docs/framework/angular/reference/interfaces/AsyncQueuedSignal.md

Repository: TanStack/pacer

Length of output: 780


Mark position and runOnItemsChange parameters as optional in the addItem type signature and parameter documentation sections.

Line 36 and lines 50-56 should use the optional parameter notation (?) to match the default values in the implementation (packages/pacer/src/async-queuer.ts).

Suggested fix
-addItem: (item, position, runOnItemsChange) => boolean;
+addItem: (item, position?, runOnItemsChange?) => boolean;

-##### position
+##### position?

-##### runOnItemsChange
+##### runOnItemsChange?
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/framework/angular/reference/interfaces/AsyncQueuedSignal.md` at line 36,
The addItem signature in the AsyncQueuedSignal interface should mark the
position and runOnItemsChange parameters as optional to match the
implementation; update the type signature for addItem to use position? and
runOnItemsChange? and update the corresponding parameter documentation entries
for position and runOnItemsChange in the AsyncQueuedSignal doc block so they
indicate optionality and align with packages/pacer/src/async-queuer.ts behavior.


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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Implementation (defaulted params) ==="
sed -n '401,408p' packages/pacer/src/queuer.ts
sed -n '6,12p' packages/angular-pacer/src/queuer/injectQueuedSignal.ts

echo
echo "=== Current docs (required params) ==="
rg -n -C2 'addItem: \(item, position, runOnItemsChange\) => boolean;|##### position\??|##### runOnItemsChange\??' \
  docs/framework/angular/reference/interfaces/QueuedSignal.md

Repository: TanStack/pacer

Length of output: 765


Update TypeScript signature and parameter headers to reflect optional parameters with defaults.

Line 36 documents addItem parameters as required, but the implementation in packages/pacer/src/queuer.ts defines defaults for both position and runOnItemsChange. The type signature should mark these as optional.

Suggested doc correction
-addItem: (item, position, runOnItemsChange) => boolean;
+addItem: (item, position?, runOnItemsChange?) => boolean;

-##### position
+##### position?

-##### runOnItemsChange
+##### runOnItemsChange?

Also applies to: lines 58-64

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/framework/angular/reference/interfaces/QueuedSignal.md` at line 36,
Update the documented TypeScript signatures in the QueuedSignal interface to
mark parameters with defaults as optional: change addItem's signature to reflect
that position and runOnItemsChange are optional (with defaults coming from
packages/pacer/src/queuer.ts) and update the parameter headers/descriptions
accordingly; apply the same optional-parameter adjustments to the other
documented methods referenced around lines 58-64 so the docs match the
implementation in queuer.ts and clearly state default values for those optional
parameters.

Comment on lines +46 to +50
Example usage:
```ts
queuer.addItem('task');
queuer.addItem('task2', 'front');
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

addItem example uses the wrong receiver name.

This interface documents QueuedValueSignal, so the example should call queued.addItem(...), not queuer.addItem(...), to avoid API confusion.

✏️ Suggested doc fix
 Example usage:
 ```ts
-queuer.addItem('task');
-queuer.addItem('task2', 'front');
+queued.addItem('task')
+queued.addItem('task2', 'front')
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion
Example usage:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/framework/angular/reference/interfaces/QueuedValueSignal.md` around
lines 46 - 50, The example under the QueuedValueSignal interface uses the wrong
receiver name; update the usage examples to call queued.addItem(...) instead of
queuer.addItem(...). Locate the example block showing addItem and replace calls
to queuer.addItem with queued.addItem so the documented API (QueuedValueSignal
and its addItem method) matches actual usage.

Comment on lines +3 to +5
"references": [
{ "path": "./tsconfig.lib.json" },
{ "path": "./tsconfig.spec.json" }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# 1) Confirm project references were added.
rg -nP '"references"\s*:\s*\[' packages/angular-pacer/tsconfig.json

# 2) Check whether referenced projects are composite.
rg -nP '"composite"\s*:\s*true' packages/angular-pacer/tsconfig.lib.json packages/angular-pacer/tsconfig.spec.json packages/angular-pacer/tsconfig.base.json tsconfig.json

# 3) Detect build-mode TypeScript invocations in repo scripts.
fd package.json | xargs -I{} rg -nP 'tsc\s+(-b|--build)' {}

Repository: TanStack/pacer

Length of output: 79


🏁 Script executed:

#!/bin/bash
# First, list files in packages/angular-pacer/ to see what tsconfig files exist
echo "=== Files in packages/angular-pacer/ ==="
find packages/angular-pacer -name "tsconfig*.json" -type f | head -20

# Check the full content of packages/angular-pacer/tsconfig.json
echo -e "\n=== packages/angular-pacer/tsconfig.json ==="
cat -n packages/angular-pacer/tsconfig.json

# Check if the referenced files exist
echo -e "\n=== Checking referenced config files ==="
for file in packages/angular-pacer/tsconfig.lib.json packages/angular-pacer/tsconfig.spec.json; do
  if [ -f "$file" ]; then
    echo "File exists: $file"
  else
    echo "File NOT found: $file"
  fi
done

Repository: TanStack/pacer

Length of output: 667


🏁 Script executed:

#!/bin/bash
# Check composite setting in referenced files
echo "=== packages/angular-pacer/tsconfig.lib.json ==="
cat -n packages/angular-pacer/tsconfig.lib.json

echo -e "\n=== packages/angular-pacer/tsconfig.spec.json ==="
cat -n packages/angular-pacer/tsconfig.spec.json

# Search for tsc --build or tsc -b in all package.json files
echo -e "\n=== Searching for tsc --build usage ==="
find . -name package.json -type f | xargs grep -n "tsc\s\+.*-b\|tsc\s\+.*--build" 2>/dev/null || echo "No matches found"

Repository: TanStack/pacer

Length of output: 2107


🏁 Script executed:

#!/bin/bash
# Search for tsc in actual repo package.json files (excluding node_modules)
echo "=== Searching in repo package.json files (not node_modules) ==="
find . -path ./node_modules -prune -o -name package.json -type f -print | while read file; do
  if grep -q "tsc" "$file" 2>/dev/null; then
    echo "=== File: $file ==="
    grep -n "tsc" "$file"
  fi
done

# Also check the root package.json specifically
echo -e "\n=== Root package.json ==="
if [ -f ./package.json ]; then
  cat -n ./package.json | head -50
fi

Repository: TanStack/pacer

Length of output: 14358


Add "composite": true to referenced TypeScript configs.

Project references at lines 3-5 reference tsconfig.lib.json and tsconfig.spec.json, but neither has "composite": true in compilerOptions. While the repo currently doesn't use tsc --build in its scripts, the configuration is incomplete: if tsc --build is executed (manually or in future CI), it will fail without this setting. Per TypeScript's project references specification, all referenced configs must declare composite mode.

Fix by adding "compilerOptions": { "composite": true } to both tsconfig.lib.json and tsconfig.spec.json.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/angular-pacer/tsconfig.json` around lines 3 - 5, The referenced
tsconfig files (tsconfig.lib.json and tsconfig.spec.json) are missing the
required composite setting for TypeScript project references; add
"compilerOptions": { "composite": true } to both tsconfig.lib.json and
tsconfig.spec.json so they declare composite mode (ensuring they can be
referenced by the root tsconfig.json "references" array and allowing tsc --build
to succeed).

{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"noEmit": false,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# 1) Inspect scripts that invoke TypeScript builds/typechecks.
fd package.json | xargs -I{} rg -nP '"(build|typecheck|test|lint)"\s*:\s*".*tsc' {}

# 2) Look specifically for build-mode usage.
fd package.json | xargs -I{} rg -nP 'tsc\s+(-b|--build)' {}

# 3) Inspect effective emit-related options across angular-pacer tsconfigs.
rg -nP '"(noEmit|declaration|composite)"\s*:' packages/angular-pacer/tsconfig*.json tsconfig.json

Repository: TanStack/pacer

Length of output: 200


🏁 Script executed:

cat -n packages/angular-pacer/tsconfig.spec.json

Repository: TanStack/pacer

Length of output: 432


🏁 Script executed:

cat -n tsconfig.json | head -30

Repository: TanStack/pacer

Length of output: 1066


🏁 Script executed:

rg -nP '\bpackages/angular-pacer' --type json | head -20

Repository: TanStack/pacer

Length of output: 622


🏁 Script executed:

find packages/angular-pacer -name "tsconfig*.json" -type f

Repository: TanStack/pacer

Length of output: 261


🏁 Script executed:

cat packages/angular-pacer/tsconfig.base.json

Repository: TanStack/pacer

Length of output: 96


🏁 Script executed:

cat packages/angular-pacer/tsconfig.lib.json

Repository: TanStack/pacer

Length of output: 183


🏁 Script executed:

# Check if spec artifacts are referenced or used anywhere
rg -nP '(dist|build|out)/.*spec' packages/angular-pacer/

# Check for any emit-related behavior in build configs
fd -e "vite.config" -e "vitest.config" -e "build" packages/angular-pacer/ | head -5

# Check package.json build scripts
cat packages/angular-pacer/package.json | grep -A 30 '"scripts"'

Repository: TanStack/pacer

Length of output: 1384


🏁 Script executed:

# Check if vitest or tsconfig uses composite builds
rg -nP 'composite|references' packages/angular-pacer/tsconfig*.json

# Check vitest config
find packages/angular-pacer -name "vitest.config*" -exec cat {} \;

# Verify what tsc does with the spec config - check if lib.json references spec
rg -nP '"references"' packages/angular-pacer/tsconfig*.json

Repository: TanStack/pacer

Length of output: 752


Change "noEmit": false to "noEmit": true in the spec configuration.

The test-only configuration inherits "declaration": true from the root and explicitly sets "noEmit": false, which causes TypeScript to emit declaration files during type checking. Since the build process uses tsdown (not tsc), vitest runs tests directly without consuming compiled spec artifacts, and no build output depends on spec declarations, emitting here is unnecessary.

Suggested change
-    "noEmit": false,
+    "noEmit": true,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"noEmit": false,
"noEmit": true,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/angular-pacer/tsconfig.spec.json` at line 4, Update the test
TypeScript config so it doesn't emit declaration files: in tsconfig.spec.json
change the compiler option "noEmit" from false to true to override the root
"declaration": true and prevent tsc from emitting .d.ts during vitest runs;
locate the "noEmit" setting in tsconfig.spec.json and set it to true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants