Skip to content

Brand.unbranded getter #4788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2025
Merged

Conversation

KhraksMamtsov
Copy link
Contributor

@KhraksMamtsov KhraksMamtsov commented Apr 24, 2025

Type

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

TS can't narrow the type of a tuple element when accessed via a branded index — which results in a wider result type.
It is possible to cast using Brand.Brand.Unbranded, but it's inconvenient — so I propose adding a corresponding utility function.
image

Related

  • Related Issue #
  • Closes #

Copy link

changeset-bot bot commented Apr 24, 2025

🦋 Changeset detected

Latest commit: 3fa397b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 32 packages
Name Type
effect Minor
@effect/cli Major
@effect/cluster Major
@effect/experimental Major
@effect/opentelemetry Major
@effect/platform-browser Major
@effect/platform-bun Major
@effect/platform-node-shared Major
@effect/platform-node Major
@effect/platform Major
@effect/printer-ansi Major
@effect/printer Major
@effect/rpc Major
@effect/sql-clickhouse Major
@effect/sql-d1 Major
@effect/sql-drizzle Major
@effect/sql-kysely Major
@effect/sql-libsql Major
@effect/sql-mssql Major
@effect/sql-mysql2 Major
@effect/sql-pg Major
@effect/sql-sqlite-bun Major
@effect/sql-sqlite-do Major
@effect/sql-sqlite-node Major
@effect/sql-sqlite-react-native Major
@effect/sql-sqlite-wasm Major
@effect/sql Major
@effect/typeclass Major
@effect/vitest Major
@effect/ai Major
@effect/ai-anthropic Major
@effect/ai-openai Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@effect-bot effect-bot force-pushed the next-minor branch 4 times, most recently from 68abf85 to 853a55e Compare April 27, 2025 16:56
@KhraksMamtsov
Copy link
Contributor Author

@tim-smart, would you mind taking a look? It seems straightforward.)

@tim-smart tim-smart merged commit 59f6d8e into Effect-TS:next-minor Apr 28, 2025
11 checks passed
@github-project-automation github-project-automation bot moved this from Discussion Ongoing to Done in PR Backlog Apr 28, 2025
@effect-bot effect-bot mentioned this pull request Apr 28, 2025
effect-bot pushed a commit that referenced this pull request Apr 28, 2025
effect-bot pushed a commit that referenced this pull request Apr 29, 2025
effect-bot pushed a commit that referenced this pull request Apr 29, 2025
effect-bot pushed a commit that referenced this pull request Apr 30, 2025
effect-bot pushed a commit that referenced this pull request Apr 30, 2025
effect-bot pushed a commit that referenced this pull request Apr 30, 2025
effect-bot pushed a commit that referenced this pull request Apr 30, 2025
effect-bot pushed a commit that referenced this pull request Apr 30, 2025
effect-bot pushed a commit that referenced this pull request Apr 30, 2025
effect-bot pushed a commit that referenced this pull request Apr 30, 2025
effect-bot pushed a commit that referenced this pull request May 1, 2025
effect-bot pushed a commit that referenced this pull request May 1, 2025
effect-bot pushed a commit that referenced this pull request May 1, 2025
effect-bot pushed a commit that referenced this pull request May 1, 2025
effect-bot pushed a commit that referenced this pull request May 2, 2025
effect-bot pushed a commit that referenced this pull request May 5, 2025
effect-bot pushed a commit that referenced this pull request May 5, 2025
effect-bot pushed a commit that referenced this pull request May 5, 2025
effect-bot pushed a commit that referenced this pull request May 5, 2025
effect-bot pushed a commit that referenced this pull request May 6, 2025
effect-bot pushed a commit that referenced this pull request May 6, 2025
effect-bot pushed a commit that referenced this pull request May 6, 2025
effect-bot pushed a commit that referenced this pull request May 6, 2025
effect-bot pushed a commit that referenced this pull request May 6, 2025
effect-bot pushed a commit that referenced this pull request May 7, 2025
effect-bot pushed a commit that referenced this pull request May 7, 2025
effect-bot pushed a commit that referenced this pull request May 8, 2025
effect-bot pushed a commit that referenced this pull request May 8, 2025
effect-bot pushed a commit that referenced this pull request May 8, 2025
effect-bot pushed a commit that referenced this pull request May 9, 2025
effect-bot pushed a commit that referenced this pull request May 9, 2025
effect-bot pushed a commit that referenced this pull request May 9, 2025
effect-bot pushed a commit that referenced this pull request May 9, 2025
effect-bot pushed a commit that referenced this pull request May 11, 2025
effect-bot pushed a commit that referenced this pull request May 11, 2025
tim-smart pushed a commit that referenced this pull request May 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants