# types/browser.types.ts

> 24 lines of code and 5 definitions.

Tree: Bane's Lab Build Scripts
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/build-scripts#file-build-scripts-types-browser-types-ts
Source text: https://banes-lab.com/source/build-scripts/types/browser.types.ts.txt

Listed in [types](https://banes-lab.com/api/source/build-scripts/types.md), after [types/anatomy.types.ts](https://banes-lab.com/source/build-scripts/types/anatomy.types.ts.md) and before [types/catalog.types.ts](https://banes-lab.com/source/build-scripts/types/catalog.types.ts.md).

## Definitions

- `BrowserWindow` (interface_declaration, line 1, exported)
- `ActivePort` (interface_declaration, line 8, exported)
- `BrowserHandle` (interface_declaration, line 13, exported)
- `ConsoleRecord` (interface_declaration, line 18, exported)
- `Session` (interface_declaration, line 24, exported)

## Contained in

- [types](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-types.md)

## Source

```typescript
export interface BrowserWindow {
    readonly width: number;
    readonly height: number;
    readonly software: boolean;
    readonly profileDir: string;
}

export interface ActivePort {
    readonly path: string;
    readonly port: string;
}

export interface BrowserHandle {
    readonly exitCode: () => number | null;
    readonly close: () => Promise<void>;
}

export interface ConsoleRecord {
    readonly level: string;
    readonly text: string;
    readonly source: string;
}

export interface Session {
    readonly send: (method: string, params?: Record<string, unknown>) => Promise<Record<string, unknown>>;
    readonly close: () => void;
    readonly records: () => readonly ConsoleRecord[];
}
```
