2.0.35 • Published 4 months ago

@types/farbtastic v2.0.35

Weekly downloads
16
License
MIT
Repository
github
Last release
4 months ago

Installation

npm install --save @types/farbtastic

Summary

This package contains type definitions for Farbtastic: jQuery Color Wheel (https://github.com/mattfarina/farbtastic).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/farbtastic.

index.d.ts

// Type definitions for Farbtastic: jQuery Color Wheel 2.0
// Project: https://github.com/mattfarina/farbtastic
// Definitions by: Matt Brooks <https://github.com/EnableSoftware>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

/// <reference types="jquery" />

declare namespace JQueryFarbtastic {
    type Placeholder = string | Element | JQuery;
    type CallbackFunction = (color: string) => any;
    type Callback = CallbackFunction | Placeholder;

    interface Options {
        callback?: Callback | undefined;
        width?: number | undefined;
        wheelWidth?: number | undefined;
    }

    interface Farbtastic {
        linked: CallbackFunction | JQuery;
        color: string;
        hsl: number[];

        linkTo(callback: Callback): Farbtastic;
        setColor(color: string | number[]): Farbtastic;
        setHSL(hsl: number[]): Farbtastic;
    }
}

interface JQueryStatic {
    farbtastic(placeholder: JQueryFarbtastic.Placeholder, callback: JQueryFarbtastic.Callback): JQueryFarbtastic.Farbtastic;
    farbtastic(placeholder: JQueryFarbtastic.Placeholder, options: JQueryFarbtastic.Options): JQueryFarbtastic.Farbtastic;
    farbtastic(placeholder: JQueryFarbtastic.Placeholder): JQueryFarbtastic.Farbtastic;
}

interface JQuery {
    farbtastic(callback: JQueryFarbtastic.Callback): JQuery;
    farbtastic(options: JQueryFarbtastic.Options): JQuery;
    farbtastic(): JQuery;
}

Additional Details

  • Last updated: Thu, 08 Jul 2021 12:01:28 GMT
  • Dependencies: @types/jquery
  • Global values: none

Credits

These definitions were written by Matt Brooks.

2.0.35

4 months ago

2.0.33

7 months ago

2.0.34

7 months ago

2.0.32

8 months ago

2.0.31

3 years ago

2.0.30

7 years ago

2.0.29

7 years ago

2.0.28

8 years ago

2.0.27

8 years ago

2.0.26-alpha

8 years ago

2.0.25-alpha

8 years ago

2.0.24-alpha

8 years ago

2.0.23-alpha

8 years ago

2.0.22-alpha

8 years ago

2.0.21-alpha

8 years ago

2.0.20-alpha

8 years ago

2.0.15-alpha

8 years ago

2.0.14-alpha

8 years ago