Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1x 1x 1x 1x 3236x 3236x | import type { Linkable } from './types.js'; import { LINKABLE } from './constant.js'; import { typeOf } from '@beerush/utils'; import { Linkables } from './enum.js'; /** * Checks if a given value is linkable. * * This function determines if the provided value's type is present in the * LINKABLE set, which defines which types are considered linkable. * * @param value - The value to check for linkability. * @returns True if the value is linkable, false otherwise. */ export function linkable(value: unknown): value is Linkable { return LINKABLE.has(typeOf(value) as Linkables); } |