-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lib): add validateContent (renamed from parseContent)
- Loading branch information
1 parent
46ef2e9
commit ca4b24f
Showing
5 changed files
with
76 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import type { FieldPluginResponse } from './FieldPluginResponse' | ||
|
||
export type CreateFieldPluginOptions<Content> = { | ||
onUpdateState: (state: FieldPluginResponse<Content>) => void | ||
validateContent?: (content: unknown) => { | ||
content: Content | ||
error?: string | ||
} | ||
} | ||
|
||
export type CreateFieldPlugin = <Content = unknown>( | ||
options: CreateFieldPluginOptions<Content>, | ||
) => () => void |