Skip to main content

Omit

Stentor API Reference


Stentor API Reference / stentor-locales/src / Omit

Type Alias: Omit\<T, K>

Omit\<T, K> = Pick\<T, Exclude\<keyof T, K>>

Defined in: packages/stentor-locales/src/localize.ts:22

Allows one to omit certain keys in the interface.

Example:

interface First { param1: string; param2: string; param3: string; }

type Second = Omit<First, "param2">

let second: Second = { param1: "Hello", param3: "World" }; second.param2 = "There"; // Compile error.

Type Parameters​

T​

T extends object

K​

K extends keyof T