Skip to content

docs: narrow clipboardItem.getType() return type from its MIME type - #54343

Merged
MarshallOfSound merged 1 commit into
45-x-yfrom
manual-bp/claude/pr/54300/branch/45-x-y
Sep 25, 2026
Merged

MarshallOfSound merged 1 commit into
45-x-yfrom
manual-bp/claude/pr/54300/branch/45-x-y

Conversation

@claude

@claude claude Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Samuel Attard · Slack thread

Description of Change

Backport of #54300

See that PR for details. This backport also bumps @electron/docs-parser to 3.0.2.

Checklist

🤖 Generated with Claude Code

https://claude.ai/code/session_01A6qgQ8Q6Q5rwKtmambSd9V

Release Notes

Notes: Improved TypeScript types for clipboardItem.getType() to narrow by MIME type.

…54300)

* docs: narrow clipboardItem.getType() return type from its MIME type

Type getType() with a generic MIME type parameter and a conditional
return type so a literal `electron application/bookmark` resolves to a
ClipboardBookmark, any other literal MIME type resolves to a Blob, and
a non-literal string still resolves to the union. Adds ts-smoke cases
for all three and drops the now-unneeded `instanceof Blob` check from
the `text/uri-list` example.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01HmVsAQiHawruFHijTtkzV9

* build: bump @electron/docs-parser to 3.0.2

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01HmVsAQiHawruFHijTtkzV9

---------

Co-authored-by: Claude <[email protected]>
(cherry picked from commit 70d678d)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01A6qgQ8Q6Q5rwKtmambSd9V
@trop trop Bot added 45-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Sep 25, 2026
@socket-security

socket-security Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​electron/​docs-parser@​3.0.1 ⏵ 3.0.288 +810087 +188 +3100

View full report

@socket-security

socket-security Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring alerts on:

View full report

@MarshallOfSound

Copy link
Copy Markdown
Member

@SocketSecurity ignore npm/@electron/[email protected]

@MarshallOfSound
MarshallOfSound enabled auto-merge (squash) September 25, 2026 09:02
@MarshallOfSound
MarshallOfSound merged commit a67bd6d into 45-x-y Sep 25, 2026
91 checks passed
@MarshallOfSound
MarshallOfSound deleted the manual-bp/claude/pr/54300/branch/45-x-y branch September 25, 2026 09:07
@release-clerk

release-clerk Bot commented Sep 25, 2026

Copy link
Copy Markdown

Release Notes Persisted

Improved TypeScript types for clipboardItem.getType() to narrow by MIME type.

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

Labels

45-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants