I have been toying around with TypeScript in the Node.js RTE, and I ran into a couple of type-operators (or at-least that's what I assume they are), and I don't know anything about them.
The first operator was the is operator, which I was able to infer the purpose of, and I found documentation on, the second however; was the assertion operator. I thought at first I understood what its purpose was, but it was behaving in the way I had expected it to, I also failed to promptly find any thorough documentation on the subject, though I am certain it exists, as TS is well documented (especially if you consider what it is that the TS developers have to document).
Where I see the Asserts Operator Being Used
I have included a snippet, and a type, that include the asserts operator. The two examples below outline situations where I ran into the asserts operator, and didn't fully understand the code, because I failed to fully understand what the asserts operator does.
Below is a code-snippet pulled from a guide on writing unit tests with TypeScript.
function assertNonNullish<TValue>(
value: TValue,
message: string
): asserts value is NonNullable<TValue> {
if (value === null || value === undefined) {
throw Error(message);
}
}
Examples Source
I also find the assert operator used to define the types of most assertion functions that included in the Node.js assertion library. This is what my hover widget shows for the assertions function deepStrictEqual's type:

_...and this is the code for the assertion function's type (same as the image, just in code form):
type DeepStrictEqual = <T>(actual: unknown, expected: T, message?: string | Error | undefined) => asserts actual is T;
I really don't understand the purpose of using the assertion operator. I would like to figure out how it relates to typing JavaScript code, and writing unit-tests & assertion functions in TypeScript, so I can better understand when (and where) I should use it.
asoperator as the "Assertion Operator", is as the same thing as the asserts operator? I am really confused TBH.assertskeyword is apparently still not documented in the official handbook, and only in the release notes and playground linked to from prior comments.