# recordOrigin (/docs/api/functions/recordOrigin)



```ts
function recordOrigin(
   ctx, 
   node, 
   path): Origin;
```

Defined in: [packages/core/src/ir.ts:104](https://github.com/austenstone/actio/blob/2b01e694a0f76521d8c073f3c6a2e48917d2c9d9/packages/core/src/ir.ts#L104)

Record `node`'s origin from a document `path`, resolving its source range.
Idempotent: an origin already on the node wins, so the earliest (pre-mutation)
mapping is preserved.

## Parameters [#parameters]

### ctx [#ctx]

[`ParseContext`](../interfaces/ParseContext.mdx)

### node [#node]

`object`

### path [#path]

[`Path`](../type-aliases/Path.mdx)

## Returns [#returns]

[`Origin`](../interfaces/Origin.mdx)


## Sitemap

Browse the full documentation: [Markdown sitemap](https://austenstone.github.io/actio/sitemap.md) · [XML sitemap](https://austenstone.github.io/actio/sitemap.xml)