diff --git a/src/nodes/__tests__/block-tag.spec-d.ts b/src/nodes/__tests__/block-tag.spec-d.ts index a3e18337..cdacf491 100644 --- a/src/nodes/__tests__/block-tag.spec-d.ts +++ b/src/nodes/__tests__/block-tag.spec-d.ts @@ -8,6 +8,7 @@ import type { Tag } from '#src/mixins' import type { Optional } from '@flex-development/tutils' import type { BlockTagData, default as TestSubject } from '../block-tag' import type Parent from '../parent' +import type TypeExpression from '../type-expression' describe('unit-d:nodes/BlockTag', () => { it('should extend Parent', () => { @@ -18,10 +19,21 @@ describe('unit-d:nodes/BlockTag', () => { expectTypeOf().toMatchTypeOf() }) - it('should match [children: BlockContent[]]', () => { + it('should match [children: Exclude[]]', () => { expectTypeOf() .toHaveProperty('children') - .toEqualTypeOf() + .extract[]>() + .toBeArray() + }) + + it('should match [children: [TypeExpression, ...Exclude[]]]', () => { + expectTypeOf() + .toHaveProperty('children') + .extract<[ + TypeExpression, + ...Exclude[] + ]>() + .toBeArray() }) it('should match [data?: Optional]', () => { diff --git a/src/nodes/block-tag.ts b/src/nodes/block-tag.ts index 2551ade1..0ff0d297 100644 --- a/src/nodes/block-tag.ts +++ b/src/nodes/block-tag.ts @@ -8,6 +8,7 @@ import type { Data } from '#src/interfaces' import type { Tag } from '#src/mixins' import type { Optional } from '@flex-development/tutils' import type Parent from './parent' +import type TypeExpression from './type-expression' /** * Info associated with block tag nodes. @@ -33,7 +34,9 @@ interface BlockTag extends Parent, Tag { * * @see {@linkcode BlockTagContent} */ - children: BlockTagContent[] + children: + | Exclude[] + | [TypeExpression, ...Exclude[]] /** * Data associated with block tag.