|
| 1 | +// Type definitions for colorbrewer v1.0.0 |
| 2 | +// Project: https://github.com/jeanlauliac/colorbrewer |
| 3 | +// Definitions by: Matt Traynham <https://github.com/mtraynham> |
| 4 | +// Definitions: https://github.com/borisyankov/DefinitelyTyped |
| 5 | + |
| 6 | +declare var colorbrewer: ColorBrewer.Base; |
| 7 | + |
| 8 | +declare module ColorBrewer { |
| 9 | + interface ColorScheme { |
| 10 | + [n: number]: string[]; |
| 11 | + } |
| 12 | + |
| 13 | + interface EightColorScheme extends ColorScheme { |
| 14 | + 3: [string, string, string]; |
| 15 | + 4: [string, string, string, string]; |
| 16 | + 5: [string, string, string, string, string]; |
| 17 | + 6: [string, string, string, string, string, string]; |
| 18 | + 7: [string, string, string, string, string, string, string]; |
| 19 | + 8: [string, string, string, string, string, string, string, string]; |
| 20 | + } |
| 21 | + |
| 22 | + interface NineColorScheme extends EightColorScheme { |
| 23 | + 9: [string, string, string, string, string, string, string, string, string]; |
| 24 | + } |
| 25 | + |
| 26 | + interface ElevenColorScheme extends NineColorScheme { |
| 27 | + 10: [string, string, string, string, string, string, string, string, string, string]; |
| 28 | + 11: [string, string, string, string, string, string, string, string, string, string, string]; |
| 29 | + } |
| 30 | + |
| 31 | + interface TwelveColorScheme extends ElevenColorScheme { |
| 32 | + 12: [string, string, string, string, string, string, string, string, string, string, string, string]; |
| 33 | + } |
| 34 | + |
| 35 | + interface Base { |
| 36 | + YlGn: NineColorScheme; |
| 37 | + YlGnBu: NineColorScheme; |
| 38 | + GnBu: NineColorScheme; |
| 39 | + BuGn: NineColorScheme; |
| 40 | + PuBuGn: NineColorScheme; |
| 41 | + PuBu: NineColorScheme; |
| 42 | + BuPu: NineColorScheme; |
| 43 | + RdPu: NineColorScheme; |
| 44 | + PuRd: NineColorScheme; |
| 45 | + OrRd: NineColorScheme; |
| 46 | + YlOrRd: NineColorScheme; |
| 47 | + YlOrBr: NineColorScheme; |
| 48 | + Purples: NineColorScheme; |
| 49 | + Blues: NineColorScheme; |
| 50 | + Greens: NineColorScheme; |
| 51 | + Oranges: NineColorScheme; |
| 52 | + Reds: NineColorScheme; |
| 53 | + Greys: NineColorScheme; |
| 54 | + PuOr: ElevenColorScheme; |
| 55 | + BrBG: ElevenColorScheme; |
| 56 | + PRGn: ElevenColorScheme; |
| 57 | + PiYG: ElevenColorScheme; |
| 58 | + RdBu: ElevenColorScheme; |
| 59 | + RdGy: ElevenColorScheme; |
| 60 | + RdYlBu: ElevenColorScheme; |
| 61 | + Spectral: ElevenColorScheme; |
| 62 | + RdYlGn: ElevenColorScheme; |
| 63 | + Accent: EightColorScheme; |
| 64 | + Dark2: EightColorScheme; |
| 65 | + Paired: TwelveColorScheme; |
| 66 | + Pastel1: NineColorScheme; |
| 67 | + Pastel2: EightColorScheme; |
| 68 | + Set1: NineColorScheme; |
| 69 | + Set2: EightColorScheme; |
| 70 | + Set3: TwelveColorScheme; |
| 71 | + } |
| 72 | +} |
| 73 | + |
| 74 | +declare module 'colorbrewer' { |
| 75 | + export = colorbrewer; |
| 76 | +} |
0 commit comments