Function isTypeString

  • A Type Guard to check if given value type is equal to "string"

    Example


    import { isString } from 'type-guard-helpers'
    const test = 'foobar' as unknown;
    if (isString(test)) {
    test; // string
    }

    Type Parameters

    • Value extends unknown

    • Result extends string = string

    Parameters

    • value: Value

    Returns value is Combine<Value, Result>

Generated using TypeDoc