| 1 |
// eslint-disable-next-line import/named |
| 2 |
import { BlockInstance } from '@wordpress/blocks'; |
| 3 |
|
| 4 |
/** |
| 5 |
* Defines typings for some non-exported Gutenberg functions to avoid |
| 6 |
* intellisense errors in function calls. |
| 7 |
* |
| 8 |
* This can be removed once Gutenberg provides typings for these functions. |
| 9 |
* |
| 10 |
* @since 3.12.0 |
| 11 |
*/ |
| 12 |
export interface GutenbergFunction { |
| 13 |
getEditedPostAttribute( attribute: string ): string; |
| 14 |
getEditedPostContent(): string; |
| 15 |
getSelectedBlock(): BlockInstance | null; |
| 16 |
getBlock( clientId: string ): BlockInstance | null; |
| 17 |
getBlocks(): BlockInstance[]; |
| 18 |
getPermalink(): string | null; |
| 19 |
} |
| 20 |
|
| 21 |
|