assertTypeString
assertTypeString
Section titled “assertTypeString”Assert that a value is of type string, with type-narrowing.
import { assertTypeString } from "@kensio/smartass";
const value: unknown = "Ada";
assertTypeString(value);
// value is now narrowed to stringSource
Section titled “Source”Source file: src/assert/type-string/type-string.assert.ts
