# toModelRef

FUNCTION in `@skmtc/core 0.63.4`

Reference a model from a ref snippet. A pending model (its projection is
being constructed further up the stack) is a back-reference: its marker
counts it, so its projection can tell that it is recursive
(`isReferencedBack`), and its import is stitched into
`destinationPath` as for any reference. The import matters when the
back-reference crosses files: in a cycle of two or more models, the model
that refers back lives in another file. Any other model goes through the
`ModelDriver`.

## Signature

```ts
import { toModelRef } from '@skmtc/core'

toModelRef<V extends GeneratedValue, EnrichmentType, ProjectionOptions = undefined>(
  args: CreateModelArgs<V, EnrichmentType, ProjectionOptions>
): ModelRef<V, EnrichmentType>
```

## Parameters

- `args` (CreateModelArgs<V, EnrichmentType, ProjectionOptions>, required)

## Returns

`ModelRef<V, EnrichmentType>`
