# ensureTypeRefContext

Ensure the current component is inside a type ref context. If not it will wrap in a \[unresolved link] component. If yes it will not add an extra node and return the original component.

* jsx

  ```tsx
  import { ensureTypeRefContext } from "@alloy-js/typescript";


  <ensureTypeRefContext tag={symbol} />
  ```

* stc

  ```ts
  import { ensureTypeRefContext } from "@alloy-js/typescript/stc";


  ensureTypeRefContext({ undefined: undefined, tag: symbol }).children(children)
  ```

## Props

|                |                             |   |
| -------------- | --------------------------- | - |
| Call signature | (props: TProps) => Children |   |
| tag            | optional symbol             |   |
