File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
core/src/schema/inlineContent Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -74,12 +74,15 @@ export function addInlineContentKeyboardShortcuts<
7474// This helper function helps to instantiate a InlineContentSpec with a
7575// config and implementation that conform to the type of Config
7676export function createInternalInlineContentSpec <
77- const T extends InlineContentConfig ,
78- > ( config : T , implementation : InlineContentImplementation < NoInfer < T > > ) {
77+ const T extends CustomInlineContentConfig ,
78+ > (
79+ config : T ,
80+ implementation : InlineContentImplementation < NoInfer < T > > ,
81+ ) : InlineContentSpec < T > {
7982 return {
8083 config,
8184 implementation,
82- } satisfies InlineContentSpec < T > ;
85+ } as const ;
8386}
8487
8588export function createInlineContentSpecFromTipTapNode <
Original file line number Diff line number Diff line change 88 getInlineContentParseRules ,
99 InlineContentFromConfig ,
1010 InlineContentSchemaWithInlineContent ,
11+ InlineContentSpec ,
1112 inlineContentToNodes ,
1213 nodeToCustomInlineContent ,
1314 PartialCustomInlineContentFromConfig ,
@@ -101,7 +102,7 @@ export function createReactInlineContentSpec<
101102> (
102103 inlineContentConfig : T ,
103104 inlineContentImplementation : ReactInlineContentImplementation < T , S > ,
104- ) {
105+ ) : InlineContentSpec < T > {
105106 const node = Node . create ( {
106107 name : inlineContentConfig . type as T [ "type" ] ,
107108 inline : true ,
@@ -257,5 +258,5 @@ export function createReactInlineContentSpec<
257258 return output as any ;
258259 } ,
259260 } ,
260- ) ;
261+ ) as any ;
261262}
You can’t perform that action at this time.
0 commit comments