Repository navigation
[lexical] Documentation Update: Add JSDoc comments to core package exports - #8895
Merged
Merged
Conversation
mayrang
requested review from
acywatson,
etrepum,
fantactuka,
ivailop7,
potatowagon and
zurfyx
as code owners
July 30, 2026 18:16
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
etrepum
approved these changes
Jul 30, 2026
Merged
This branch was successfully deployed
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
The
lexicalcore package exports ~100 public functions and constants that had no JSDoc. IDE autocomplete showed bare signatures with no hint of what each function does. This PR adds single-line/** ... */JSDoc comments to the exported symbols that were missing them across 14 files.Coverage by file group:
LexicalCommands.ts) — 25 command constants (SELECTION_CHANGE_COMMAND,CLICK_COMMAND,PASTE_COMMAND, etc.). Pattern: "Dispatched when/on/to...".LexicalConstants.ts) — 11 formatting bitmasks and lookup tables. Pattern: "Bitmask for...".environment.ts) — 10 platform/browser detection flags (IS_APPLE,IS_FIREFOX,CAN_USE_BEFORE_INPUT, etc.).LexicalSelection.ts) — 12 selection utilities ($getSelection,$createRangeSelection,$isBlockElementNode, etc.).LexicalUtils.ts) — 28 utility functions ($getRoot,$splitNode,$applyNodeReplacement,toggleTextFormatType, etc.).$normalizeSelection,isCurrentlyReadOnlyMode,$parseSerializedNode.$isTextNode,$isElementNode, ...) and factory functions ($createParagraphNode,$createLineBreakNode, ...).Existing JSDoc (e.g. on
DELETE_CHARACTER_COMMAND,INSERT_LINE_BREAK_COMMAND,CUT_COMMAND,SELECT_ALL_COMMAND) was left untouched. The 3-line deletion is the// Text node formattingline comment inLexicalConstants.tsand the Android WebView UA comment inenvironment.ts, both replaced by their JSDoc equivalents.Test plan
pnpm test-unit— all pass. No code changes, only JSDoc additions.