mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 12:42:58 +08:00
Merge branch 'master' into refactor-codemirror
This commit is contained in:
13
codemirror/codemirror.d.ts
vendored
13
codemirror/codemirror.d.ts
vendored
@@ -326,8 +326,15 @@ 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;
|
||||
|
||||
/** This event is fired before a change is applied, and its handler may choose to modify or cancel the change.
|
||||
|
||||
/** 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.
|
||||
Note: you may not do anything from a "beforeChange" handler that would cause changes to the document or its visualization.
|
||||
Doing so will, since this handler is called directly from the bowels of the CodeMirror implementation,
|
||||
@@ -605,7 +612,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;
|
||||
}
|
||||
|
||||
8
data-driven/data-driven-tests.ts
Normal file
8
data-driven/data-driven-tests.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/// <reference path="data-driven.d.ts" />
|
||||
|
||||
import data_driven = require('data-driven');
|
||||
|
||||
data_driven([
|
||||
{key:"value"},
|
||||
{key:"foobar"}
|
||||
],() => {});
|
||||
9
data-driven/data-driven.d.ts
vendored
Normal file
9
data-driven/data-driven.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// Type definitions for data-driven.js
|
||||
// Project: https://github.com/fluentsoftware/data-driven
|
||||
// Definitions by: Adam Babcock <https://github.com/mrhen>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "data-driven" {
|
||||
function data_driven<T>(data:T[], callback:()=>any):any;
|
||||
export = data_driven
|
||||
}
|
||||
9
pascal-case/pascal-case-tests.ts
Normal file
9
pascal-case/pascal-case-tests.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/// <reference path="pascal-case.d.ts" />
|
||||
|
||||
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"
|
||||
9
pascal-case/pascal-case.d.ts
vendored
Normal file
9
pascal-case/pascal-case.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// Type definitions for pascal-case
|
||||
// Project: https://github.com/blakeembrey/pascal-case
|
||||
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "pascal-case" {
|
||||
function pascalCase(string: string, locale?: string): string;
|
||||
export = pascalCase;
|
||||
}
|
||||
Reference in New Issue
Block a user