# resolveNodeSize

Canonical: https://docs.shumoku.dev/ja/library/api/resolveNodeSize
Language: ja

@shumoku/core · 0.4.0 · function

# resolveNodeSize

[ソース](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/engine/index.ts#L85)

APIの説明は英語のcanonical sourceを表示しています。

Resolve a node's display size — returns the node's own \`size\` if set, otherwise asks the engine for its body size. Pass \`engine\` to share its TextMeasurer cache with other queries. Without one, a process-wide default engine is created lazily; this is fine for one-off helpers but not ideal for hot loops where explicit control matters.

```
resolveNodeSize(node: { label?: string | string[]; size?: { height: number; width: number }; spec?: NodeSpec }, engine?: LayoutEngine): { height: number; width: number }
```

## パラメーター

| 名前 | 型 | 説明 | 既定値 |
| --- | --- | --- | --- |
| `node` | `{ label?: string | string[]; size?: { height: number; width: number }; spec?: NodeSpec }` | 追加説明はありません。 | `—` |
| `engine` | `LayoutEngine` | 追加説明はありません。 | `—` |

## 戻り値

```
{ height: number; width: number }
```

[`libs/@shumoku/core/src/layout/engine/index.ts:85`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/engine/index.ts#L85)
