createClientFeature
returns the wrong type, or createServerFeature
needs the wrong type
#8060
Labels
createClientFeature
returns the wrong type, or createServerFeature
needs the wrong type
#8060
Link to reproduction
No response
Environment Info
Describe the Bug
I wanted to create a feature for the lexical editor. I followed the Docs and the offical video. My server feature complained about the wrong types.
The
createServerFunction({}).feature.ClientFeature
needs:PayloadComponent<never, { featureKey: string; order: number; }> | undefined
The type
createClientFeature
returned:FC<{featureKey: string, order: number}>
As I crawled through the compiled files at
@payloadcms/richtext-lexica
l I found that the shipped features (Bold-, Italic Feature etc.) used the createClientFeature from theutilities
folder. Since I can't import that function, I thought I would post this issue here because maby the wrong function got exported.Reproduction Steps
Create a minimal custom Feature for the Lexical Editor.
myFeature/feature.client.ts
myFeature/feature.server.ts
There is no need to import it anywhere, since the IDE should show the error that the type does not match.
Adapters and Plugins
No response
The text was updated successfully, but these errors were encountered: