Skip to content

Add interface to access V8-only error method.#808

Merged
ditman merged 2 commits intogoogle:mainfrom
ditman:add-v8-only-ts-accessor
Mar 10, 2026
Merged

Add interface to access V8-only error method.#808
ditman merged 2 commits intogoogle:mainfrom
ditman:add-v8-only-ts-accessor

Conversation

@ditman
Copy link
Copy Markdown
Collaborator

@ditman ditman commented Mar 10, 2026

Description

Add interface to access V8-only error method.

(Unblocks cl/880945339)

Pre-launch Checklist

If you need help, consider asking for advice on the discussion board.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request updates the package version to 0.8.5 and introduces a V8ErrorConstructor interface to correctly type and access the V8-specific captureStackTrace method on the Error object within the A2uiError class, improving type safety. A review comment suggests an improvement to use the 'captureStackTrace' in Error operator for checking property existence, which is more idiomatic and readable than casting Error within the conditional.

@ditman
Copy link
Copy Markdown
Collaborator Author

ditman commented Mar 10, 2026

(Actually, I'm going to duplicate this error class into the v0_8 renderer, so there's no need to cross import from 0_9 into 0_8)

@ditman ditman requested a review from gspencergoog March 10, 2026 19:55
@ditman
Copy link
Copy Markdown
Collaborator Author

ditman commented Mar 10, 2026

PTAL @gspencergoog, I duplicated the errors.js class into 0_8 so we don't need to take a dependency from 0_9 just for the errors class (that was the only instance I could find where we're importing from 0_9 into 0_8)

@ditman ditman merged commit 5dfeb04 into google:main Mar 10, 2026
11 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in A2UI Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants