(
config:
| ((editor: PlateEditor) => PlatePluginConfig<K, O, A, T, S>)
| PlatePluginConfig<K, O, A, T, S> = {}
)
| 41 | >; |
| 42 | |
| 43 | export const createPlatePlugin = < |
| 44 | K extends string = any, |
| 45 | O = {}, |
| 46 | A = {}, |
| 47 | T = {}, |
| 48 | S = {}, |
| 49 | >( |
| 50 | config: |
| 51 | | ((editor: PlateEditor) => PlatePluginConfig<K, O, A, T, S>) |
| 52 | | PlatePluginConfig<K, O, A, T, S> = {} |
| 53 | ): PlatePlugin<PluginConfig<K, O, A, T, S>> => { |
| 54 | const plugin = createSlatePlugin(config as any); |
| 55 | |
| 56 | return toPlatePlugin(plugin as any) as any; |
| 57 | }; |
| 58 | |
| 59 | /** |
| 60 | * Explicitly typed version of `createPlatePlugin`. |
no test coverage detected
searching dependent graphs…