# selection.StringFilter

- **Module:** selection
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** typealias
- **Source:** https://github.com/libtmux/libtmux-ts/blob/46cccfef2a546de55ce8b308249b8c76339089a0/packages/libtmux/src/selection.ts#L75
- **Page:** https://libtmux.org/en/ts/latest/reference/selection-stringfilter/

```ts
type StringFilter<Value = never, Raw extends string = string> = StringFilterFields<Value, Raw> &
(
  | { readonly contains: string }
  | { readonly endsWith: string }
  | { readonly equals: Value | Raw | null }
  | { readonly in: readonly (Value | Raw)[] }
  | { readonly notIn: readonly (Value | Raw)[] }
  | { readonly regex: RegexCriteriaData }
  | { readonly startsWith: string }
)
```

A text comparison, of which exactly one form must be given.

Written as a union so the type rejects `{}` — criteria that constrain
nothing would match everything, which is never what a caller meant.

## Type parameters

- `Value` (default `never`)
- `Raw` (bound `string`, default `string`)
