import type { Ary } from "."; import type { Args, Fn } from "../HKT"; import type { AssertBool } from "../helpers"; /** * Check if an {@link Ary} (i.e., `Array` or `ReadonlyArray`) is readonly. * * Sig: `(a: Ary) => boolean` * * @example * ```typescript * type R1 = IsReadonly; * // ^?: false * type R2 = IsReadonly; * // ^?: true * type R3 = IsReadonly<["foo", "bar"]>; * // ^?: false * type R4 = IsReadonly; * // ^?: true * ``` */ export type IsReadonly = AssertBool; /** * [Fn] Check if an {@link Ary} (i.e., `Array` or `ReadonlyArray`) is readonly. * * Sig: `(a: Ary) => boolean` */ export default interface IsReadonlyFn extends Fn<[Ary], boolean> { def: ([a]: Args) => IsReadonly; }