# TypeScript types example

This example shows how to integrate the TypeScript type system into Next.js. Since TypeScript is supported out of the box with Next.js, all we have to do is to install TypeScript.

This example shows how to properly export and import typescript types without getting the

```js
Attempted import error: 'TypeA' is not exported from './package-1'.
```

error as raised in [vercel/next.js#7882](https://github.com/vercel/next.js/issues/7882).

## Deploy your own

Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example) or preview live with [StackBlitz](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/with-typescript-types)

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-typescript-types)

## Useful links

[Add import type and export type support to TypeScript](https://github.com/babel/babel/pull/11171)
