feat(core-interfaces): add FluidReadonlyArray type - #27747
Open
jenn-le wants to merge 13 commits into
Open
Conversation
Contributor
|
Hi! Thank you for opening this PR. Want me to review it? Based on the diff (744 lines, 11 files), I've queued these reviewers:
How this works
|
jenn-le
force-pushed
the
add-fluid-readonly-array
branch
2 times, most recently
from
July 23, 2026 18:10
2583321 to
5cdf764
Compare
jenn-le
force-pushed
the
add-fluid-readonly-array
branch
from
July 23, 2026 20:55
7e19418 to
2c8b5d2
Compare
Add FluidReadonlyArray<T> as a TypeScript-version-independent equivalent of ReadonlyArray, following the pattern of FluidReadonlyMap and FluidMap. Includes stable methods through ES2023 (at, findLast, findLastIndex) but excludes copy-on-write methods (toReversed, toSorted, toSpliced, with) that our implementations do not yet provide. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
jenn-le
force-pushed
the
add-fluid-readonly-array
branch
from
July 23, 2026 20:56
2c8b5d2 to
49a0424
Compare
- Fix Symbol.unscopables to use [K in keyof (readonly any[])] matching native - Change callback array params from FluidReadonlyArray<T> to readonly T[] - Fix flatMap signature to match native exactly (mutable T[], This type param) - Rewrite type tests using requireAssignableTo from @fluidframework/build-tools - Remove negative assignability tests and delete custom typeTestUtils.ts - Migrate fluidMapTypes.ts to use requireAssignableTo Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Update doc comment, changeset, and type test comment per Craig's feedback - Use specific 'lib' terminology instead of 'TypeScript-version-independent' Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Remove iterator return-type checks (structural type makes them meaningless) - Add lib-dependency disclaimers to FluidReadonlyMap assignability checks - Add sanity-check disclaimers to native→Fluid assignability checks - Point to API reports for validating FluidIterableIterator usage Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Remove backticks and package names from summary line - Remove trailing period from summary - Wrap body at sentence boundaries Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Josmithr
reviewed
Jul 28, 2026
Josmithr
reviewed
Jul 28, 2026
Josmithr
reviewed
Jul 28, 2026
Josmithr
reviewed
Jul 28, 2026
Josmithr
reviewed
Jul 28, 2026
Josmithr
reviewed
Jul 28, 2026
Josmithr
reviewed
Jul 28, 2026
Josmithr
left a comment
Contributor
There was a problem hiding this comment.
Left a few docs suggestions 🤓
Co-authored-by: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com>
Co-authored-by: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com>
Co-authored-by: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com>
Co-authored-by: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com>
Co-authored-by: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com>
- Rewrite reduce/reduceRight descriptions with clearer Mozilla-style wording - Remove blank line between changeset frontmatter and summary Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
|
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output |
Contributor
Bundle size comparisonBase commit: Notable changes
Per-bundle deltas
|
Josmithr
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add
FluidReadonlyArray<T>to@fluidframework/core-interfacesas a TypeScript-version-independent equivalent of the built-inReadonlyArraytype, following the same pattern as the existingFluidReadonlyMapandFluidMaptypes.This includes stable methods through ES2023 (
at(),findLast(),findLastIndex()) but deliberately excludes newer copy-on-write methods (toReversed(),toSorted(),toSpliced(),with()) that our implementations do not yet provide. This ensures Fluid Framework types remain safe to implement without being broken by TypeScript updates that add new members toReadonlyArray.The type is introduced at
@betaand re-exported fromfluid-framework. It will be used in a follow-up PR to replace theextends ReadonlyArray<T>inReadonlyArrayNode/TreeArrayNode.Reviewer Guidance
Reviewer guidance wiki
FluidReadonlyArrayinterface is inpackages/common/core-interfaces/src/fluidArray.tssrc/test/types/typeTestUtils.ts(also used by existingfluidMapTypes.ts)