narrowing
Also written: narrow, narrowed
Turning a wider type, such as a union, into a narrower one with a check like `typeof id === "number"`. Inside the `if`, TypeScript knows the more specific type.
Also written: narrow, narrowed
Turning a wider type, such as a union, into a narrower one with a check like `typeof id === "number"`. Inside the `if`, TypeScript knows the more specific type.