fn
withAttrs
testedReturn a copy of node with new attrs.
Signature
ts
export function withAttrs(node: Node, attrs: Attrs): Node{ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
node | Node | — |
attrs | Attrs | — |
Returns
Node| Property | Type | Description |
|---|---|---|
id | string | — |
type | string | — |
attrs | Attrs | — |
content | Content | — |