# session.Session.newWindow

- **Module:** session.Session
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/session.ts#L286
- **Page:** https://libtmux.org/en/ts/latest/reference/session-session-newwindow/

```
session.Session.newWindow(options: : NewWindowOptions) -> Promise<Window>
```

Create a window in this session and resolve it as a handle.

The handle costs a snapshot of the whole server, not of this session: a
window made here is linked into every session grouped with it, and the
handle reports those links. When the id is enough,
`server.pipeline([session.plan.newWindow().argv])` returns it for one
command, whatever the server's size.

## Example

```ts
const created = await session.newWindow({ name: "editor" });
created.name; // "editor"
```
