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 writable (i.e., not readonly). * * Sig: `(a: Ary) => boolean` * * @example * ```typescript * type R1 = IsWritable; * // ^?: true * type R2 = IsWritable; * // ^?: false * type R3 = IsWritable<["foo", "bar"]>; * // ^?: true * type R4 = IsWritable; * // ^?: false * ``` */ export type IsWritable = AssertBool; /** * Check if an {@link Ary} (i.e., `Array` or `ReadonlyArray`) is writable (i.e., not readonly). * * Sig: `(a: Ary) => boolean` */ export default interface IsWritableFn extends Fn<[Ary], boolean> { def: ([a]: Args) => IsWritable; }