[wordpress__blocks]: Add Children attributes (#42858)

* Add Children attributes

* Add as author
This commit is contained in:
Jon Surrell
2020-03-13 02:08:38 +01:00
committed by GitHub
parent f5433b84c0
commit 64cb3541bc

View File

@@ -1,6 +1,7 @@
// Type definitions for @wordpress/blocks 6.4
// Project: https://github.com/WordPress/gutenberg/tree/master/packages/blocks/README.md
// Definitions by: Derek Sifford <https://github.com/dsifford>
// Jon Surrell <https://github.com/sirreal>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.6
@@ -272,6 +273,12 @@ export namespace AttributeSource {
default?: string;
});
interface Children {
source: 'children';
type: 'array';
selector?: string;
}
interface HTML {
source: 'html';
type: 'string';
@@ -327,6 +334,7 @@ export namespace AttributeSource {
export type BlockAttribute<T> =
| AttributeSource.Attribute
| AttributeSource.Children
| AttributeSource.HTML
| AttributeSource.Meta
| AttributeSource.Query<T>