mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Can't call spectrum function with a method name
By declaring the spectrum function with the optional options parameter this function will allways be chosen by typescript. All the other spectrum functions where you supply a method name can't be called. Moving the function with optional options parameter to the end of the file will fix this problem.
This commit is contained in:
parent
2cc4331067
commit
420b4ce9e7
14
spectrum/spectrum.d.ts
vendored
14
spectrum/spectrum.d.ts
vendored
@ -8,12 +8,6 @@
|
||||
|
||||
interface JQuery {
|
||||
|
||||
/**
|
||||
* Initializes the input element that it is called on
|
||||
* as a spectrum colorpicker instance.
|
||||
*/
|
||||
spectrum(options?: Spectrum.Options): JQuery;
|
||||
|
||||
/**
|
||||
* Shows the colorpicker.
|
||||
*/
|
||||
@ -97,6 +91,12 @@ interface JQuery {
|
||||
*/
|
||||
spectrum(methodName: string): any; // in most cases this is JQuery except for the get method which returns a tinycolorInstance
|
||||
|
||||
/**
|
||||
* Initializes the input element that it is called on
|
||||
* as a spectrum colorpicker instance.
|
||||
*/
|
||||
spectrum(options?: Spectrum.Options): JQuery;
|
||||
|
||||
/**
|
||||
* Called at the beginning of a drag event on either hue slider, alpha slider, or main color picker areas.
|
||||
*/
|
||||
@ -289,4 +289,4 @@ declare module Spectrum {
|
||||
*/
|
||||
beforeShow?: (color: tinycolorInstance) => void;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user