From 202f2f6eb3cb9ad2277e954feb0bbfe8df5def9c Mon Sep 17 00:00:00 2001 From: Seon-Wook Park Date: Tue, 24 Jun 2014 00:05:22 +0900 Subject: [PATCH 01/11] noble: Add Peripheral.updateRssi method --- noble/noble.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/noble/noble.d.ts b/noble/noble.d.ts index f9c833bd1..3a2765d7b 100644 --- a/noble/noble.d.ts +++ b/noble/noble.d.ts @@ -27,6 +27,7 @@ declare module "noble" { connect(callback: (error: string) => void): void; disconnect(callback: () => void): void; + updateRssi(callback: (error: string, rssi: number) => void): void; discoverServices(serviceUUIDs: string[], listener: (error: string, services: Service[]) => void): void; discoverAllServicesAndCharacteristics(callback: (error: string, services: Service[], characteristics: Characteristic[]) => void): void; discoverSomeServicesAndCharacteristics(serviceUUIDs: string[], characteristicUUIDs: string[], callback: (error: string, services: Service[], characteristics: Characteristic[]) => void): void; From 9886325bf6dd1083d241e0d8d5213840eb8aa934 Mon Sep 17 00:00:00 2001 From: Seon-Wook Park Date: Tue, 24 Jun 2014 00:11:37 +0900 Subject: [PATCH 02/11] noble: Add test for new peripheral.updateRssi --- noble/noble-tests.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/noble/noble-tests.ts b/noble/noble-tests.ts index 46851ab52..852174530 100644 --- a/noble/noble-tests.ts +++ b/noble/noble-tests.ts @@ -35,6 +35,7 @@ peripheral.advertisement = { }; peripheral.connect((error: string): void => {}); peripheral.disconnect((): void => {}); +peripheral.updateRssi((error: string, rssi: number): void => {}); peripheral.discoverServices(["180d"], (error: string, services: noble.Service[]): void => {}); peripheral.discoverAllServicesAndCharacteristics((error: string, services: noble.Service[], characteristics: noble.Characteristic[]): void => {}); peripheral.discoverSomeServicesAndCharacteristics(["180d"], ["2a38"], (error: string, services: noble.Service[], characteristics: noble.Characteristic[]): void => {}); From bb198751d9bf6123cfa2129615a784dfd2d5c72a Mon Sep 17 00:00:00 2001 From: Rogier Schouten Date: Thu, 12 Jun 2014 12:16:20 +0200 Subject: [PATCH 03/11] Bugfixes in timezone-js --- timezone-js/timezone-js.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/timezone-js/timezone-js.d.ts b/timezone-js/timezone-js.d.ts index 50b9c3f36..fa7616e39 100644 --- a/timezone-js/timezone-js.d.ts +++ b/timezone-js/timezone-js.d.ts @@ -11,7 +11,7 @@ declare module "timezone-js" { export var Date: { new (timezone?: string): TimezoneJsDate; new (time: string, timezone?: string): TimezoneJsDate; - new (year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: string, timezone?: string): TimezoneJsDate; + new (year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number, timezone?: string): TimezoneJsDate; }; export interface TimezoneJsDate extends Date { @@ -25,6 +25,7 @@ declare module "timezone-js" { transport(opts: TimezoneJsOptions): any; init(opts?: TimezoneJsOptions): any; + getAllZones(): string[]; } export interface TimezoneJsOptions { From 228e8cb844a3b862bf58902c2fff6e276295b42a Mon Sep 17 00:00:00 2001 From: Rogier Schouten Date: Thu, 12 Jun 2014 14:06:43 +0200 Subject: [PATCH 04/11] Lots more things wrong - typings simply did not work. --- timezone-js/timezone-js.d.ts | 76 +++++++++++++++++++++++++++++------- 1 file changed, 61 insertions(+), 15 deletions(-) diff --git a/timezone-js/timezone-js.d.ts b/timezone-js/timezone-js.d.ts index fa7616e39..ecf7d9e48 100644 --- a/timezone-js/timezone-js.d.ts +++ b/timezone-js/timezone-js.d.ts @@ -8,19 +8,68 @@ declare module "timezone-js" { export var timezone: TimezoneJs; - export var Date: { - new (timezone?: string): TimezoneJsDate; - new (time: string, timezone?: string): TimezoneJsDate; - new (year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number, timezone?: string): TimezoneJsDate; - }; - - export interface TimezoneJsDate extends Date { + export class Date { + constructor(timezone?: string); + // Note due to naming conflict I have not found a way to introduce the constructor + // that takes a regular Date object. Instead, I defined it to take an Object. + constructor(date: Object, timezone?: string); + constructor(utcMillis: number, timezone?: string); + constructor(time: string, timezone?: string); + constructor(year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number, timezone?: string); setTimezone: (timezone: string) => void; + + // regular Date members + toString(): string; + toDateString(): string; + toTimeString(): string; + toLocaleString(): string; + toLocaleDateString(): string; + toLocaleTimeString(): string; + valueOf(): number; + getTime(): number; + getFullYear(): number; + getUTCFullYear(): number; + getMonth(): number; + getUTCMonth(): number; + getDate(): number; + getUTCDate(): number; + getDay(): number; + getUTCDay(): number; + getHours(): number; + getUTCHours(): number; + getMinutes(): number; + getUTCMinutes(): number; + getSeconds(): number; + getUTCSeconds(): number; + getMilliseconds(): number; + getUTCMilliseconds(): number; + getTimezoneOffset(): number; + setTime(time: number): number; + + // Note the setters have a non-void return type. Date has them as well, according to TypeScript + setMilliseconds(ms: number): number; + setUTCMilliseconds(ms: number): number; + setSeconds(sec: number, ms?: number): number; + setUTCSeconds(sec: number, ms?: number): number; + setMinutes(min: number, sec?: number, ms?: number): number; + setUTCMinutes(min: number, sec?: number, ms?: number): number; + setHours(hours: number, min?: number, sec?: number, ms?: number): number; + setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; + setDate(date: number): number; + setUTCDate(date: number): number; + setMonth(month: number, date?: number): number; + setUTCMonth(month: number, date?: number): number; + setFullYear(year: number, month?: number, date?: number): number; + setUTCFullYear(year: number, month?: number, date?: number): number; + toUTCString(): string; + toISOString(): string; + toJSON(key?: any): string; } + export interface TimezoneJs { zoneFileBasePath: string; - loadingScheme: TimezoneJsLoadingScheme; + loadingScheme: number; loadingSchemes: TimezoneJsLoadingSchemes; transport(opts: TimezoneJsOptions): any; @@ -35,12 +84,9 @@ declare module "timezone-js" { url?: string; } - export interface TimezoneJsLoadingScheme { - } - - export enum TimezoneJsLoadingSchemes { - PRELOAD_ALL, - LAZY_LOAD, - MANUAL_LOAD + export class TimezoneJsLoadingSchemes { + PRELOAD_ALL: number; + LAZY_LOAD: number; + MANUAL_LOAD: number; } } From c7f95e49fa768d87cad278db242074499e8c01b4 Mon Sep 17 00:00:00 2001 From: Rogier Schouten Date: Wed, 25 Jun 2014 13:50:49 +0200 Subject: [PATCH 05/11] Add missing callback parameter to dgram.Socket.bind() and update dgram.Socket.send() --- node/node.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/node.d.ts b/node/node.d.ts index 4eb3e5eae..d0ffa5445 100644 --- a/node/node.d.ts +++ b/node/node.d.ts @@ -763,8 +763,8 @@ declare module "dgram" { export function createSocket(type: string, callback?: Function): Socket; interface Socket extends events.EventEmitter { - send(buf: Buffer, offset: number, length: number, port: number, address: string, callback?: Function): void; - bind(port: number, address?: string): void; + send(buf: Buffer, offset: number, length: number, port: number, address: string, callback?: (error: Error, bytes: number)): void; + bind(port: number, address?: string, callback?: () => void): void; close(): void; address: { address: string; family: string; port: number; }; setBroadcast(flag: boolean): void; From c64855dc68af9c7ac537195f8ee6010b0b6d58ca Mon Sep 17 00:00:00 2001 From: Rogier Schouten Date: Wed, 25 Jun 2014 14:10:15 +0200 Subject: [PATCH 06/11] CI build fix --- node/node.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/node.d.ts b/node/node.d.ts index d0ffa5445..bfe4754cb 100644 --- a/node/node.d.ts +++ b/node/node.d.ts @@ -763,7 +763,7 @@ declare module "dgram" { export function createSocket(type: string, callback?: Function): Socket; interface Socket extends events.EventEmitter { - send(buf: Buffer, offset: number, length: number, port: number, address: string, callback?: (error: Error, bytes: number)): void; + send(buf: Buffer, offset: number, length: number, port: number, address: string, callback?: (error: Error, bytes: number) => void): void; bind(port: number, address?: string, callback?: () => void): void; close(): void; address: { address: string; family: string; port: number; }; From c10ae26f0a9bd59d62980503eaad69613c793b2a Mon Sep 17 00:00:00 2001 From: Seon-Wook Park Date: Wed, 25 Jun 2014 22:40:55 +0900 Subject: [PATCH 07/11] noble: Respect optional parameters --- noble/noble-tests.ts | 15 +++++++++++++++ noble/noble.d.ts | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/noble/noble-tests.ts b/noble/noble-tests.ts index 852174530..4b1d39656 100644 --- a/noble/noble-tests.ts +++ b/noble/noble-tests.ts @@ -33,11 +33,17 @@ peripheral.advertisement = { manufacturerData: new Buffer(1), serviceUuids: ["0x180a", "0x180d"] }; +peripheral.connect(); peripheral.connect((error: string): void => {}); +peripheral.disconnect(); peripheral.disconnect((): void => {}); +peripheral.updateRssi(); peripheral.updateRssi((error: string, rssi: number): void => {}); +peripheral.discoverServices(["180d"]); peripheral.discoverServices(["180d"], (error: string, services: noble.Service[]): void => {}); +peripheral.discoverAllServicesAndCharacteristics(); peripheral.discoverAllServicesAndCharacteristics((error: string, services: noble.Service[], characteristics: noble.Characteristic[]): void => {}); +peripheral.discoverSomeServicesAndCharacteristics(["180d"], ["2a38"]); peripheral.discoverSomeServicesAndCharacteristics(["180d"], ["2a38"], (error: string, services: noble.Service[], characteristics: noble.Characteristic[]): void => {}); peripheral.readHandle(new Buffer(1), (error: string, data: NodeBuffer): void => {}); peripheral.writeHandle(new Buffer(1), new Buffer(1), true, (error: string): void => {}); @@ -51,7 +57,9 @@ service.uuid = "180a"; service.name = ""; service.type = ""; service.includedServiceUuids = ["180d"]; +service.discoverIncludedServices(["180d"]); service.discoverIncludedServices(["180d"], (error: string, includedServiceUuids: string[]): void => {}); +service.discoverCharacteristics(["2a38"]); service.discoverCharacteristics(["2a38"], (error: string, characteristics: noble.Characteristic[]): void => {}); service.on("includedServicesDiscover", (includedServiceUuids: string[]): void => {}); service.on("characteristicsDiscover", (characteristics: noble.Characteristic[]): void => {}); @@ -61,10 +69,15 @@ characteristic.uuid = "2a37"; characteristic.name = ""; characteristic.type = ""; characteristic.properties = ["read", "notify"]; +characteristic.read(); characteristic.read((error: string, data: NodeBuffer): void => {}); +characteristic.write(new Buffer(1), true); characteristic.write(new Buffer(1), true, (error: string): void => {}); +characteristic.broadcast(true); characteristic.broadcast(true, (error: string): void => {}); +characteristic.notify(true); characteristic.notify(true, (error: string): void => {}); +characteristic.discoverDescriptors(); characteristic.discoverDescriptors((error: string, descriptors: noble.Descriptor[]): void => {}); characteristic.on("read", (data: NodeBuffer, isNotification: boolean): void => {}); characteristic.on("write", true, (error: string): void => {}); @@ -76,7 +89,9 @@ var descriptor: noble.Descriptor = new noble.Descriptor(); descriptor.uuid = ""; descriptor.name = ""; descriptor.type = ""; +descriptor.readValue(); descriptor.readValue((error: string, data: NodeBuffer): void => {}); +descriptor.writeValue(new Buffer(1)); descriptor.writeValue(new Buffer(1), (error: string): void => {}); descriptor.on("valueRead", (error: string, data: NodeBuffer): void => {}); descriptor.on("valueWrite", (error: string): void => {}); diff --git a/noble/noble.d.ts b/noble/noble.d.ts index 3a2765d7b..554f4a4d2 100644 --- a/noble/noble.d.ts +++ b/noble/noble.d.ts @@ -25,11 +25,17 @@ declare module "noble" { rssi: number; services: string[]; + connect(): void; connect(callback: (error: string) => void): void; + disconnect(): void; disconnect(callback: () => void): void; + updateRssi(): void; updateRssi(callback: (error: string, rssi: number) => void): void; + discoverServices(serviceUUIDs: string[]): void; discoverServices(serviceUUIDs: string[], listener: (error: string, services: Service[]) => void): void; + discoverAllServicesAndCharacteristics(): void; discoverAllServicesAndCharacteristics(callback: (error: string, services: Service[], characteristics: Characteristic[]) => void): void; + discoverSomeServicesAndCharacteristics(serviceUUIDs: string[], characteristicUUIDs: string[]): void; discoverSomeServicesAndCharacteristics(serviceUUIDs: string[], characteristicUUIDs: string[], callback: (error: string, services: Service[], characteristics: Characteristic[]) => void): void; readHandle(handle: NodeBuffer, callback: (error: string, data: NodeBuffer) => void): void; @@ -58,7 +64,9 @@ declare module "noble" { includedServiceUuids: string[]; characteristics: Characteristic[]; + discoverIncludedServices(serviceUUIDs: string[]): void; discoverIncludedServices(serviceUUIDs: string[], callback: (error: string, includedServiceUuids: string[]) => void): void; + discoverCharacteristics(characteristicUUIDs: string[]): void; discoverCharacteristics(characteristicUUIDs: string[], callback: (error: string, characteristics: Characteristic[]) => void): void; toString(): string; @@ -74,10 +82,15 @@ declare module "noble" { properties: string[]; descriptors: Descriptor[]; + read(): void; read(callback: (error: string, data: NodeBuffer) => void): void; + write(data: NodeBuffer, notify: boolean): void; write(data: NodeBuffer, notify: boolean, callback: (error: string) => void): void; + broadcast(broadcast: boolean): void; broadcast(broadcast: boolean, callback: (error: string) => void): void; + notify(notify: boolean): void; notify(notify: boolean, callback: (error: string) => void): void; + discoverDescriptors(): void; discoverDescriptors(callback: (error: string, descriptors: Descriptor[]) => void): void; toString(): string; @@ -95,7 +108,9 @@ declare module "noble" { name: string; type: string; + readValue(): void; readValue(callback: (error: string, data: NodeBuffer) => void): void; + writeValue(data: NodeBuffer): void; writeValue(data: NodeBuffer, callback: (error: string) => void): void; toString(): string; From a61804f9d999ade20b29687a9eed458d7d845b0e Mon Sep 17 00:00:00 2001 From: Bart van der Schoor Date: Thu, 26 Jun 2014 04:17:22 +0200 Subject: [PATCH 08/11] small fixes to glob & glob-stream --- glob-stream/glob-stream-tests.ts | 2 +- glob/glob.d.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/glob-stream/glob-stream-tests.ts b/glob-stream/glob-stream-tests.ts index f6a0e4bf3..1f0cbd358 100644 --- a/glob-stream/glob-stream-tests.ts +++ b/glob-stream/glob-stream-tests.ts @@ -1,4 +1,4 @@ -/// +/// import gs = require('glob-stream'); diff --git a/glob/glob.d.ts b/glob/glob.d.ts index 46ab16e0a..a15417f72 100644 --- a/glob/glob.d.ts +++ b/glob/glob.d.ts @@ -21,6 +21,7 @@ declare module "glob" { var Glob:IGlobStatic; interface IOptions extends minimatch.IOptions { + cwd?: string; sync?: boolean; nomount?: boolean; matchBase?:any; From 7ae6c54d6d5eb0ca95eb06cf4224999101ed72ce Mon Sep 17 00:00:00 2001 From: Seon-Wook Park Date: Thu, 26 Jun 2014 11:48:25 +0900 Subject: [PATCH 09/11] noble: Use less verbose optional parameters syntax --- noble/noble.d.ts | 45 +++++++++++++++------------------------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/noble/noble.d.ts b/noble/noble.d.ts index 554f4a4d2..fb0a7a491 100644 --- a/noble/noble.d.ts +++ b/noble/noble.d.ts @@ -25,18 +25,12 @@ declare module "noble" { rssi: number; services: string[]; - connect(): void; - connect(callback: (error: string) => void): void; - disconnect(): void; - disconnect(callback: () => void): void; - updateRssi(): void; - updateRssi(callback: (error: string, rssi: number) => void): void; - discoverServices(serviceUUIDs: string[]): void; - discoverServices(serviceUUIDs: string[], listener: (error: string, services: Service[]) => void): void; - discoverAllServicesAndCharacteristics(): void; - discoverAllServicesAndCharacteristics(callback: (error: string, services: Service[], characteristics: Characteristic[]) => void): void; - discoverSomeServicesAndCharacteristics(serviceUUIDs: string[], characteristicUUIDs: string[]): void; - discoverSomeServicesAndCharacteristics(serviceUUIDs: string[], characteristicUUIDs: string[], callback: (error: string, services: Service[], characteristics: Characteristic[]) => void): void; + connect(callback?: (error: string) => void): void; + disconnect(callback?: () => void): void; + updateRssi(callback?: (error: string, rssi: number) => void): void; + discoverServices(serviceUUIDs: string[], callback?: (error: string, services: Service[]) => void): void; + discoverAllServicesAndCharacteristics(callback?: (error: string, services: Service[], characteristics: Characteristic[]) => void): void; + discoverSomeServicesAndCharacteristics(serviceUUIDs: string[], characteristicUUIDs: string[], callback?: (error: string, services: Service[], characteristics: Characteristic[]) => void): void; readHandle(handle: NodeBuffer, callback: (error: string, data: NodeBuffer) => void): void; writeHandle(handle: NodeBuffer, data: NodeBuffer, withoutResponse: boolean, callback: (error: string) => void): void; @@ -64,10 +58,8 @@ declare module "noble" { includedServiceUuids: string[]; characteristics: Characteristic[]; - discoverIncludedServices(serviceUUIDs: string[]): void; - discoverIncludedServices(serviceUUIDs: string[], callback: (error: string, includedServiceUuids: string[]) => void): void; - discoverCharacteristics(characteristicUUIDs: string[]): void; - discoverCharacteristics(characteristicUUIDs: string[], callback: (error: string, characteristics: Characteristic[]) => void): void; + discoverIncludedServices(serviceUUIDs: string[], callback?: (error: string, includedServiceUuids: string[]) => void): void; + discoverCharacteristics(characteristicUUIDs: string[], callback?: (error: string, characteristics: Characteristic[]) => void): void; toString(): string; on(event: string, listener: Function): events.EventEmitter; @@ -82,16 +74,11 @@ declare module "noble" { properties: string[]; descriptors: Descriptor[]; - read(): void; - read(callback: (error: string, data: NodeBuffer) => void): void; - write(data: NodeBuffer, notify: boolean): void; - write(data: NodeBuffer, notify: boolean, callback: (error: string) => void): void; - broadcast(broadcast: boolean): void; - broadcast(broadcast: boolean, callback: (error: string) => void): void; - notify(notify: boolean): void; - notify(notify: boolean, callback: (error: string) => void): void; - discoverDescriptors(): void; - discoverDescriptors(callback: (error: string, descriptors: Descriptor[]) => void): void; + read(callback?: (error: string, data: NodeBuffer) => void): void; + write(data: NodeBuffer, notify: boolean, callback?: (error: string) => void): void; + broadcast(broadcast: boolean, callback?: (error: string) => void): void; + notify(notify: boolean, callback?: (error: string) => void): void; + discoverDescriptors(callback?: (error: string, descriptors: Descriptor[]) => void): void; toString(): string; on(event: string, listener: Function): events.EventEmitter; @@ -108,10 +95,8 @@ declare module "noble" { name: string; type: string; - readValue(): void; - readValue(callback: (error: string, data: NodeBuffer) => void): void; - writeValue(data: NodeBuffer): void; - writeValue(data: NodeBuffer, callback: (error: string) => void): void; + readValue(callback?: (error: string, data: NodeBuffer) => void): void; + writeValue(data: NodeBuffer, callback?: (error: string) => void): void; toString(): string; on(event: string, listener: Function): events.EventEmitter; From 7da688bafd9ce303f4a1a44d27df960fd177ade8 Mon Sep 17 00:00:00 2001 From: Bart van der Schoor Date: Thu, 26 Jun 2014 01:39:56 +0200 Subject: [PATCH 10/11] added definitions for chalk --- chalk/chalk-tests.ts | 30 +++++++++++++++ chalk/chalk.d.ts | 92 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 chalk/chalk-tests.ts create mode 100644 chalk/chalk.d.ts diff --git a/chalk/chalk-tests.ts b/chalk/chalk-tests.ts new file mode 100644 index 000000000..208709e5b --- /dev/null +++ b/chalk/chalk-tests.ts @@ -0,0 +1,30 @@ +/// + +import chalk = require('chalk'); + +var str: string; +var bool: boolean; + +chalk.enabled = bool; +str = chalk.stripColor(str); + +bool = chalk.supportsColor; +bool = chalk.hasColor(str); + +// style a string +console.log( chalk.blue('Hello world!') ); + +// combine styled and normal strings +console.log( chalk.blue('Hello'), 'World' + chalk.red('!') ); + +// compose multiple styles using the chainable API +console.log( chalk.blue.bgRed.bold('Hello world!') ); + +// pass in multiple arguments +console.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') ); + +// nest styles +console.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') ); + +// nest styles of the same type even (color, underline, background) +console.log( chalk.green('I am a green line ' + chalk.blue('with a blue substring') + ' that becomes green again!') ); diff --git a/chalk/chalk.d.ts b/chalk/chalk.d.ts new file mode 100644 index 000000000..5cceb9514 --- /dev/null +++ b/chalk/chalk.d.ts @@ -0,0 +1,92 @@ +// Type definitions for chalk v0.4.0 +// Project: https://github.com/sindresorhus/chalk +// Definitions by: Diullei Gomes , Bart van der Schoor +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module Chalk { + export interface ChalkModule extends ChalkStyle { + enabled: boolean; + supportsColor: boolean; + styles: ChalkStyleMap; + + stripColor(value: string): any; + hasColor(str: string): boolean; + } + + export interface ChalkChain extends ChalkStyle { + (...text: string[]): ChalkChain; + } + + export interface ChalkStyleElement { + open: string; + close: string; + } + + export interface ChalkStyle { + // General + reset: ChalkChain; + bold: ChalkChain; + italic: ChalkChain; + underline: ChalkChain; + inverse: ChalkChain; + strikethrough: ChalkChain; + + // Text colors + black: ChalkChain; + red: ChalkChain; + green: ChalkChain; + yellow: ChalkChain; + blue: ChalkChain; + magenta: ChalkChain; + cyan: ChalkChain; + white: ChalkChain; + gray: ChalkChain; + + // Background colors + bgBlack: ChalkChain; + bgRed: ChalkChain; + bgGreen: ChalkChain; + bgYellow: ChalkChain; + bgBlue: ChalkChain; + bgMagenta: ChalkChain; + bgCyan: ChalkChain; + bgWhite: ChalkChain; + } + + export interface ChalkStyleMap { + // General + reset: ChalkStyleElement; + bold: ChalkStyleElement; + italic: ChalkStyleElement; + underline: ChalkStyleElement; + inverse: ChalkStyleElement; + strikethrough: ChalkStyleElement; + + // Text colors + black: ChalkStyleElement; + red: ChalkStyleElement; + green: ChalkStyleElement; + yellow: ChalkStyleElement; + blue: ChalkStyleElement; + magenta: ChalkStyleElement; + cyan: ChalkStyleElement; + white: ChalkStyleElement; + gray: ChalkStyleElement; + + // Background colors + bgBlack: ChalkStyleElement; + bgRed: ChalkStyleElement; + bgGreen: ChalkStyleElement; + bgYellow: ChalkStyleElement; + bgBlue: ChalkStyleElement; + bgMagenta: ChalkStyleElement; + bgCyan: ChalkStyleElement; + bgWhite: ChalkStyleElement; + } +} + +declare module "chalk" { + var ch: Chalk.ChalkModule; + export = ch; +} + From 51dd18f27273bfbdf9756fecd47020d70cb3168b Mon Sep 17 00:00:00 2001 From: Bart van der Schoor Date: Thu, 26 Jun 2014 02:42:53 +0200 Subject: [PATCH 11/11] fixed some headers --- flipsnap/flipsnap.d.ts | 2 +- hammerjs/hammerjs.d.ts | 3 +-- sockjs-node/sockjs-node.d.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/flipsnap/flipsnap.d.ts b/flipsnap/flipsnap.d.ts index 55e601704..e763cfe17 100644 --- a/flipsnap/flipsnap.d.ts +++ b/flipsnap/flipsnap.d.ts @@ -1,6 +1,6 @@ // Type definitions for flipsnap.js // Project: http://pxgrid.github.io/js-flipsnap/ -// Definitions by: kubosho_ , gsino , Mayuki Sawatari +// Definitions by: kubosho , gsino , Mayuki Sawatari // Definitions: https://github.com/borisyankov/DefinitelyTyped interface IFlipsnap { diff --git a/hammerjs/hammerjs.d.ts b/hammerjs/hammerjs.d.ts index f2dff3046..6f4c0d4ce 100644 --- a/hammerjs/hammerjs.d.ts +++ b/hammerjs/hammerjs.d.ts @@ -1,7 +1,6 @@ // Type definitions for Hammer.js 1.1.3 // Project: http://eightmedia.github.com/hammer.js/ -// Definitions by: Boris Yankov -// Drew Noakes +// Definitions by: Boris Yankov , Drew Noakes // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/sockjs-node/sockjs-node.d.ts b/sockjs-node/sockjs-node.d.ts index 99e4663b7..e054fe2eb 100644 --- a/sockjs-node/sockjs-node.d.ts +++ b/sockjs-node/sockjs-node.d.ts @@ -1,7 +1,7 @@ // Type definitions for sockjs-node 0.3.x // Project: https://github.com/sockjs/sockjs-node // Definitions by: Phil McCloghry-Laing -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped ///