Skip to content

fix: export public hook types#17

Merged
salza80 merged 4 commits into
mainfrom
types
Jun 23, 2026
Merged

fix: export public hook types#17
salza80 merged 4 commits into
mainfrom
types

Conversation

@salza80

@salza80 salza80 commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Improves the library’s TypeScript surface by exporting named hook/method types (and SDK payload/options types), and adds an export/type smoke test to catch regressions in the published package’s typings.

Changes:

Export TelemetryDeckHooks plus named method types (TelemetryDeckSignal, TelemetryDeckSafeSignal, etc.) from src/hooks, and re-export TelemetryDeckOptions/TelemetryDeckPayload from @telemetrydeck/sdk.
Update internal tests to use the new named TelemetryDeckHooks type instead of ReturnType.
Add a tsc-based exports/type smoke test and wire it into test:exports.

@github-actions

Copy link
Copy Markdown

size-limit report 📦

Path Size
dist/index.mjs 1.3 KB (0%)
dist/index.cjs 1.41 KB (0%)

@salza80 salza80 requested a review from Copilot June 23, 2026 08:35
@salza80 salza80 self-assigned this Jun 23, 2026
@salza80 salza80 added the enhancement New feature or request label Jun 23, 2026
@salza80 salza80 changed the title fix: improve type exports fix: export public hook types Jun 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Improves the library’s TypeScript surface by exporting named hook/method types (and SDK payload/options types), and adds an export/type smoke test to catch regressions in the published package’s typings.

Changes:

  • Export TelemetryDeckHooks plus named method types (TelemetryDeckSignal, TelemetryDeckSafeSignal, etc.) from src/hooks, and re-export TelemetryDeckOptions/TelemetryDeckPayload from @telemetrydeck/sdk.
  • Update internal tests to use the new named TelemetryDeckHooks type instead of ReturnType<typeof useTelemetryDeck>.
  • Add a tsc-based exports/type smoke test and wire it into test:exports.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/exports/types.ts Adds a TS smoke test that validates the package exports the new public types and they’re usable together.
tests/exports/tsconfig.json Adds a dedicated TS config for the exports typecheck.
src/tests/plugin.test.ts Switches VM typing to the newly exported TelemetryDeckHooks.
src/tests/hooks.test.ts Switches VM typing to the newly exported TelemetryDeckHooks.
src/hooks/index.ts Introduces and exports named public hook/method types and re-exports SDK payload/options types.
README.md Documents the new public TypeScript helper types with a usage example.
package.json Extends test:exports to run tsc on the new type smoke test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/hooks/index.ts Outdated
Comment thread src/hooks/index.ts Outdated
Comment thread src/hooks/index.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.

@salza80 salza80 merged commit 56b5fa5 into main Jun 23, 2026
2 checks passed
@salza80 salza80 deleted the types branch June 23, 2026 08:54
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.3.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants