MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / isMentionElement

Function isMentionElement

packages/web/src/features/chat/utils.ts:119–121  ·  view source on GitHub ↗
(element: Descendant)

Source from the content-addressed store, hash-verified

117}
118
119export const isMentionElement = (element: Descendant): element is MentionElement => {
120 return 'type' in element && element.type === 'mention';
121}
122
123export const isCustomTextElement = (element: Descendant): element is CustomText => {
124 return 'text' in element && typeof element.text === 'string';

Callers 2

slateContentToStringFunction · 0.70
getAllMentionElementsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected