sketches
    Preparing search index...

    Static methods for evaluating if objects implement various interfaces and types for type safety.

    Index

    Methods

    • Does the given input implement the Palette type?

      Parameters

      • input: unknown

        The input to check.

      Returns input is {
          COLORS: readonly {
              DISCRIMINATOR: PALETTE_COLOR;
              HEX: string;
              HSL?: Readonly<{ H: number; L: number; S: number }>;
              LUMINANCE?: number;
              NAME: string;
              RGB?: Readonly<{ B: number; G: number; R: number }>;
          }[];
          CONTRAST_MAP?: Readonly<Record<string, readonly string[]>>;
          DISCRIMINATOR: PALETTE;
          IS_GRADIENT: boolean;
          NAME: string;
          SOURCE?: string;
          SOURCE_URL?: string;
      }

      true if the given input implements the Palette type, false if it does not.

    • Does the given input implement the PaletteColor type?

      Parameters

      • input: unknown

        The input to check.

      Returns input is {
          DISCRIMINATOR: PALETTE_COLOR;
          HEX: string;
          HSL?: Readonly<{ H: number; L: number; S: number }>;
          LUMINANCE?: number;
          NAME: string;
          RGB?: Readonly<{ B: number; G: number; R: number }>;
      }

      true if the given input implements the PaletteColor type, false if it does not.