# createTilingSplitNode
Source: https://docs.maelstrom-ai.co/0.2/reference/client/functions/createtilingsplitnode/
Documentation revision: 89a8f5e9d10cedcf0b30376d7846113f06f26120
SDK manifests in this build: @maelstrom-co/react@0.2.1, @maelstrom-co/client@0.2.1, @maelstrom-co/connectors@0.2.1, @maelstrom-co/protocol@0.2.1, @maelstrom-co/engine@0.2.1
These docs follow this source revision. Manifest versions do not prove release compatibility; verify the installed package exports before using an API.

> **createTilingSplitNode**(`direction`, `children`): [`TilingSplitNode`](https://docs.maelstrom-ai.co/0.2/reference/client/interfaces/tilingsplitnode/)

Defined in: packages/client/src/lib/chart-manager/tiling.ts:115

Builds a validated split node.

A weight that is zero, negative or fractional does not fail loudly during layout: it hands a child a region of zero or negative extent, or a sum that no longer divides the parent, so the malformed geometry surfaces far from the code that invented the weight. Guarding the sum is not enough — weights `[5, -1]` sum to 4 and still overlap.

## Parameters

### direction

[`TilingSplit`](https://docs.maelstrom-ai.co/0.2/reference/client/type-aliases/tilingsplit/)

### children

readonly \[{ `node?`: [`TilingTreeNode`](https://docs.maelstrom-ai.co/0.2/reference/client/type-aliases/tilingtreenode/); `weight`: `number`; }, { `node?`: [`TilingTreeNode`](https://docs.maelstrom-ai.co/0.2/reference/client/type-aliases/tilingtreenode/); `weight`: `number`; }, { `node?`: [`TilingTreeNode`](https://docs.maelstrom-ai.co/0.2/reference/client/type-aliases/tilingtreenode/); `weight`: `number`; }\]

## Returns

[`TilingSplitNode`](https://docs.maelstrom-ai.co/0.2/reference/client/interfaces/tilingsplitnode/)

## Throws

If `children`’s weights violate the split invariant — see assertValidSplitWeights.
