---
jsApi: true
title: "[F] getNs"

---
```ts
getNs(program, target): XmlNamespace | undefined
```

Get the namespace and prefix for the given type.

## Parameters

| Parameter | Type |
| :------ | :------ |
| `program` | `Program` |
| `target` | `Type` |

## Returns

[`XmlNamespace`](../interfaces/XmlNamespace.md) \| `undefined`
