# TS2708: Cannot use namespace '…' as a value.

> A namespace with only types is used as a value. Use one of its exported values, or refer to it in a type position only.

## What it means

The namespace contains only types (for example interfaces), so there's no object for it at
runtime. Using its name in an expression is an error.

## Example

```ts
namespace Api {
  export interface Request { url: string }
}
const a = Api;
export {};
```

## How to fix

- Use it only in types: `let r: Api.Request`.
- If you need a runtime object, export values from the namespace or use a plain object.

Source: https://ts-r.dev/errors/TS2708/
