Skip to content

Conversation

@davidbraginsky
Copy link

Description

I have noticed that all serialized nodes have their types exported from their respective packages with the exception of SerializedCodeHighlightNode and SerializedCollapsibleContainerNode.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 30, 2025
@vercel
Copy link

vercel bot commented Jul 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 30, 2025 1:51pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 30, 2025 1:51pm

Copy link
Collaborator

@etrepum etrepum left a comment

Choose a reason for hiding this comment

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

I don't think there's all that much use for this in general, unless you want it to show up in the API documentation. There are other ways to get to that type such as using LexicalExportJSON

import {$createCodeNode} from './CodeNode';

type SerializedCodeHighlightNode = Spread<
export type SerializedCodeHighlightNode = Spread<
Copy link
Collaborator

Choose a reason for hiding this comment

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

This isn't sufficient to use the type because it's not exported from the package's entrypoint (index.ts)

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants