Skip to content

fix: correct type export and register custom element in the DOM#17

Merged
hriczzoli merged 4 commits intomainfrom
fix-type-exports
Mar 10, 2026
Merged

fix: correct type export and register custom element in the DOM#17
hriczzoli merged 4 commits intomainfrom
fix-type-exports

Conversation

@hriczzoli
Copy link
Contributor

No description provided.

@hriczzoli hriczzoli self-assigned this Feb 27, 2026
Copilot AI review requested due to automatic review settings February 27, 2026 20:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves TypeScript consumer ergonomics for the corti-embedded web component by ensuring the published type entrypoint is correct and by adding DOM typings so the custom element is strongly typed when selected from the document.

Changes:

  • Added a CortiEmbeddedElement type and registered 'corti-embedded' in HTMLElementTagNameMap for typed DOM access.
  • Updated the package exports["."].types entry to point at dist/web-index.d.ts (matching the TS entrypoint rather than the bundled JS).
  • Updated the TypeScript demo to rely on querySelector('corti-embedded') typing and to make the event listener attachment null-safe.

Reviewed changes

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

File Description
src/types/api.ts Adds a DOM element type and global HTMLElementTagNameMap augmentation for corti-embedded.
package.json Fixes the exported types path to align with the TS-compiled web entrypoint (web-index).
demo/demo.ts Updates demo typing approach for the element and adjusts imports / event listener attachment.

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
filipweilid
filipweilid previously approved these changes Mar 10, 2026
@hriczzoli hriczzoli merged commit 68ae757 into main Mar 10, 2026
4 checks passed
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