Skip to content

Add draft spec text#5

Open
jasnell wants to merge 10 commits intomainfrom
jasnell/add-spec-draft
Open

Add draft spec text#5
jasnell wants to merge 10 commits intomainfrom
jasnell/add-spec-draft

Conversation

@jasnell
Copy link
Collaborator

@jasnell jasnell commented Feb 4, 2026

No description provided.

@jasnell jasnell requested a review from ljharb February 4, 2026 04:45
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

The rendered spec for this PR is available at https://tc39.es/proposal-typedarray-findwithin/pr/5.

@jasnell jasnell force-pushed the jasnell/add-spec-draft branch from 1ccd9c7 to bd79d79 Compare February 4, 2026 05:03
@jasnell jasnell force-pushed the jasnell/add-spec-draft branch from 9f904b9 to db7daad Compare February 4, 2026 05:19
Copy link
Member

@bakkot bakkot left a comment

Choose a reason for hiding this comment

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

LGTM other than comment. I think later we might want to either define an AO for "SameValueZero-equal" or at least rephrase and put it somewhere which can be shared, but it's fine for now.

Also I continue to think these should all take an offset parameter, but that can be a followup.

@bakkot
Copy link
Member

bakkot commented Feb 4, 2026

Oh, and I also (weakly) still think the needle should be any iterable, which will be much more annoying to specify. But again, that can be a followup if that's the direction we decide to go.

spec.emu Outdated
<h1>Properties of the %TypedArray% Prototype Object</h1>

<emu-clause id="sec-%typedarray%.prototype.search">
<h1>%TypedArray%.prototype.search ( _needle_ )</h1>
Copy link
Member

Choose a reason for hiding this comment

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

why "search" and not "indexOf"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

indexOf already exists and I didn't want to overload it. 'search' is at least parallel with String.prototype.search but obviously doesn't have the regexp argument. 100% open to more suggested colors for the bikeshed here, just don't want to overload any of the existing method names

@jasnell

This comment was marked as resolved.

@jasnell jasnell force-pushed the jasnell/add-spec-draft branch from bce0c5f to b8f65ae Compare February 6, 2026 01:30
@jasnell jasnell force-pushed the jasnell/add-spec-draft branch from 245e216 to 088572c Compare February 6, 2026 06:00
@jasnell jasnell force-pushed the jasnell/add-spec-draft branch from 088572c to 0d2d06c Compare February 6, 2026 06:05
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.

4 participants