feat: add explicit type annotations to utils namespace#67
feat: add explicit type annotations to utils namespace#67JosunLP merged 4 commits intodevelopmentfrom
Conversation
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/dee01a2a-2c87-443e-b48b-a412ec2f5ef3
There was a problem hiding this comment.
Pull request overview
This PR formalizes the public typing surface of the core/utils aggregated utils namespace by introducing a BQueryUtils interface and explicitly typing utils (plus a small explicit type annotation for isDev), making the API shape more stable and easier to reference for consumers.
Changes:
- Add
BQueryUtilsinterface and type theutilsnamespace asBQueryUtils. - Re-export
BQueryUtilsfrom core and full entry points. - Add a test block intended to validate the
utils/BQueryUtilsrelationship.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/utils.test.ts | Adds a new test section intended to validate utils against BQueryUtils. |
| src/store/utils.ts | Adds an explicit : boolean annotation to isDev. |
| src/full.ts | Re-exports BQueryUtils as a type from the full bundle entry point. |
| src/core/utils/index.ts | Introduces BQueryUtils and types the aggregated utils object explicitly. |
| src/core/index.ts | Re-exports BQueryUtils from the core entry point. |
|
@copilot apply changes based on the comments in this thread |
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/2a8aae83-97d4-40cd-93fb-7264b53e4979
Applied the review-thread follow-up in 0518a1d: |
|
@copilot apply changes based on the comments in this thread |
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/77dfff22-3e29-4c54-803e-aefe93d16faf
Applied in b8def16. The |
|
@copilot apply changes based on the comments in this thread |
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/2962e271-d2ad-49f2-bb15-2b9570e94543
Applied in 94968bd. The |
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
The
utilsnamespace object andisDevconstant relied on TypeScript inference rather than having explicit type annotations, inconsistent with the project's strict typing conventions.Changes
BQueryUtilsinterface (src/core/utils/index.ts): Defines the full public shape of theutilsnamespace — 39 members, allreadonly, organized by categoryutilsconst typed asBQueryUtilsinstead of inferredBQueryUtilsfunction members:debounce,throttle, andoncenow reusetypeofthe exported implementations to avoid signature driftisDev(src/store/utils.ts): Added explicit: booleanannotationBQueryUtilsre-exported fromsrc/core/index.tsandsrc/full.tsutilsis assignable toBQueryUtilsUsage
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.