From 7518bed77b54c4f2dfc4a1d8254bcdd8c5941729 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Sat, 25 Jul 2015 18:14:47 -0700 Subject: [PATCH 1/5] [CodeMirror] removed is actually a list of string. as is test on the same object. --- codemirror/codemirror.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemirror/codemirror.d.ts b/codemirror/codemirror.d.ts index 5fc335ed6..6574005e3 100644 --- a/codemirror/codemirror.d.ts +++ b/codemirror/codemirror.d.ts @@ -600,7 +600,7 @@ declare module CodeMirror { /** Array of strings representing the text that replaced the changed range (split by line). */ text: string[]; /** Text that used to be between from and to, which is overwritten by this change. */ - removed: string; + removed: string[]; /** String representing the origin of the change event and wether it can be merged with history */ origin: string; } From 6e3410f0476284ea72e913eb10d2f635dcf77b81 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Thu, 30 Jul 2015 10:26:04 -0700 Subject: [PATCH 2/5] [CodeMirror] Add onchanges that triggers on a per operation basis. cf doc for this event: http://codemirror.net/doc/manual.html#event_changes --- codemirror/codemirror.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/codemirror/codemirror.d.ts b/codemirror/codemirror.d.ts index 198eaa0a4..2feaab080 100644 --- a/codemirror/codemirror.d.ts +++ b/codemirror/codemirror.d.ts @@ -326,6 +326,16 @@ declare module CodeMirror { /** Fires every time the content of the editor is changed. */ on(eventName: 'change', handler: (instance: CodeMirror.Editor, change: CodeMirror.EditorChangeLinkedList) => void ): void; off(eventName: 'change', handler: (instance: CodeMirror.Editor, change: CodeMirror.EditorChangeLinkedList) => void ): void; + + + /** Like the "change" event, but batched per operation, passing an + * array containing all the changes that happened in the operation. + * This event is fired after the operation finished, and display + * changes it makes will trigger a new operation. */ + on(eventName: 'changes', handler: (instance: CodeMirror.Editor, change: CodeMirror.EditorChangeLinkedList[]) => void ): void; + off(eventName: 'changes', handler: (instance: CodeMirror.Editor, change: CodeMirror.EditorChangeLinkedList[]) => void ): void; + + /** This event is fired before a change is applied, and its handler may choose to modify or cancel the change. The changeObj never has a next property, since this is fired for each individual change, and not batched per operation. From cc6ccf4737a32db214856dfc5f61a1644bcb7077 Mon Sep 17 00:00:00 2001 From: Sam Saint-Pettersen Date: Mon, 3 Aug 2015 16:38:57 +0100 Subject: [PATCH 3/5] Type definitions and tests for pascal-case --- pascal-case/pascal-case.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 pascal-case/pascal-case.d.ts diff --git a/pascal-case/pascal-case.d.ts b/pascal-case/pascal-case.d.ts new file mode 100644 index 000000000..9e52ed3e0 --- /dev/null +++ b/pascal-case/pascal-case.d.ts @@ -0,0 +1,9 @@ +// Type definitions for pascal-case +// Project: https://github.com/blakeembrey/pascal-case +// Definitions by: Sam Saint-Pettersen +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "pascal-case" { + function pascalCase(string: string, locale?: string): string; + export = pascalCase; +} From b9afb4c0f2b0d04684740d1f703b38fd7a44a0b1 Mon Sep 17 00:00:00 2001 From: Sam Saint-Pettersen Date: Mon, 3 Aug 2015 16:40:35 +0100 Subject: [PATCH 4/5] Type definitions and tests for pascal-case --- pascal-case/pascal-case-tests.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 pascal-case/pascal-case-tests.ts diff --git a/pascal-case/pascal-case-tests.ts b/pascal-case/pascal-case-tests.ts new file mode 100644 index 000000000..b13ed2665 --- /dev/null +++ b/pascal-case/pascal-case-tests.ts @@ -0,0 +1,9 @@ +/// + +import pascalCase = require('pascal-case'); + +console.log(pascalCase('string')); // => "String" +console.log(pascalCase('camelCase')); // => "CamelCase" +console.log(pascalCase('sentence case')); // => "SentenceCase" + +console.log(pascalCase('MY STRING', 'tr')); // => "MyStrıng" From 51bcadbed05822b9f701ffddb8158cdc955a2fe5 Mon Sep 17 00:00:00 2001 From: Adam Babcock Date: Mon, 3 Aug 2015 16:28:52 -0500 Subject: [PATCH 5/5] Add typing for data-driven --- data-driven/data-driven-tests.ts | 8 ++++++++ data-driven/data-driven.d.ts | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 data-driven/data-driven-tests.ts create mode 100644 data-driven/data-driven.d.ts diff --git a/data-driven/data-driven-tests.ts b/data-driven/data-driven-tests.ts new file mode 100644 index 000000000..b91c8361a --- /dev/null +++ b/data-driven/data-driven-tests.ts @@ -0,0 +1,8 @@ +/// + +import data_driven = require('data-driven'); + +data_driven([ + {key:"value"}, + {key:"foobar"} + ],() => {}); diff --git a/data-driven/data-driven.d.ts b/data-driven/data-driven.d.ts new file mode 100644 index 000000000..79bb80b31 --- /dev/null +++ b/data-driven/data-driven.d.ts @@ -0,0 +1,9 @@ +// Type definitions for data-driven.js +// Project: https://github.com/fluentsoftware/data-driven +// Definitions by: Adam Babcock +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "data-driven" { + function data_driven(data:T[], callback:()=>any):any; + export = data_driven +}