From 47b934362ae9891e5a2d4ae819a5381d7f7e0d60 Mon Sep 17 00:00:00 2001 From: Giovanni Bassi Date: Wed, 19 Aug 2015 16:24:39 -0300 Subject: [PATCH 01/11] Remove global `module` definition from angular-mocks Because it conficts with commonjs. See http://wiki.commonjs.org/wiki/Modules/1.1: > In a module, there must be a free variable "module", that is an Object. Also see the existing `module` declaration on: https://github.com/borisyankov/DefinitelyTyped/blob/27e02d6674ffe8186a567515b4c157bcf945911e/node/node.d.ts#L61 Workaround is to use `angular.mock.module` instead of `module`. Closes #2072 --- angularjs/angular-mocks.d.ts | 3 ++- bardjs/bardjs-tests.ts | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/angularjs/angular-mocks.d.ts b/angularjs/angular-mocks.d.ts index e6b668a7b..09e4ac61f 100644 --- a/angularjs/angular-mocks.d.ts +++ b/angularjs/angular-mocks.d.ts @@ -237,5 +237,6 @@ declare module angular { /////////////////////////////////////////////////////////////////////////////// // functions attached to global object (window) /////////////////////////////////////////////////////////////////////////////// -declare var module: (...modules: any[]) => any; +//Use `angular.mock.module` instead of `module`, as `module` conflicts with commonjs. +//declare var module: (...modules: any[]) => any; declare var inject: angular.IInjectStatic; diff --git a/bardjs/bardjs-tests.ts b/bardjs/bardjs-tests.ts index b033ffe3c..71671b23e 100644 --- a/bardjs/bardjs-tests.ts +++ b/bardjs/bardjs-tests.ts @@ -39,7 +39,7 @@ module bardTests { var myService: MyService; var $rootScope: angular.IRootScopeService; - beforeEach(module(bard.$httpBackend, 'myModule')); + beforeEach(angular.mock.module(bard.$httpBackend, 'myModule')); beforeEach(inject(function(_myService_: MyService, _$rootScope_: angular.IRootScopeService) { myService = _myService_; @@ -63,7 +63,7 @@ module bardTests { function test_$q() { var myService: MyService; - beforeEach(module(bard.$q, bard.$httpBackend, 'myModule')); + beforeEach(angular.mock.module(bard.$q, bard.$httpBackend, 'myModule')); beforeEach(inject(function(_myService_: MyService) { myService = _myService_; @@ -139,7 +139,7 @@ module bardTests { * bard.fakeLogger */ function test_fakeLogger() { - beforeEach(module('myModule', bard.fakeLogger)); + beforeEach(angular.mock.module('myModule', bard.fakeLogger)); //// beforeEach(bard.appModule('myModule', bard.fakeLogger)); //// @@ -150,7 +150,7 @@ module bardTests { * bard.fakeRouteHelperProvider */ function test_fakeRouteHelperProvider() { - beforeEach(module('myModule', bard.fakeRouteHelperProvider)); + beforeEach(angular.mock.module('myModule', bard.fakeRouteHelperProvider)); //// beforeEach(bard.appModule('myModule', bard.fakeRouteHelperProvider)); //// @@ -161,7 +161,7 @@ module bardTests { * bard.fakeRouteProvider */ function test_fakeRouteProvider() { - beforeEach(module('myModule', bard.fakeRouteProvider)); + beforeEach(angular.mock.module('myModule', bard.fakeRouteProvider)); //// beforeEach(bard.appModule('myModule', bard.fakeRouteProvider)); //// @@ -172,7 +172,7 @@ module bardTests { * bard.fakeStateProvider */ function test_fakeStateProvider() { - beforeEach(module('myModule', bard.fakeStateProvider)); + beforeEach(angular.mock.module('myModule', bard.fakeStateProvider)); //// beforeEach(bard.appModule('myModule', bard.fakeStateProvider)); //// @@ -183,7 +183,7 @@ module bardTests { * bard.fakeToastr */ function test_fakeToastr() { - beforeEach(module('myModule', bard.fakeToastr)); + beforeEach(angular.mock.module('myModule', bard.fakeToastr)); //// beforeEach(bard.appModule('myModule', bard.fakeToastr)); //// From 7d3ff05c2d12bb3708bdb09383d4832939cda487 Mon Sep 17 00:00:00 2001 From: tkQubo Date: Wed, 26 Aug 2015 21:46:42 +0900 Subject: [PATCH 02/11] Add coffeeify --- coffeeify/coffeeify-tests.ts | 15 +++++++++++++++ coffeeify/coffeeify.d.ts | 37 ++++++++++++++++++++++++++++++++++++ through/through.d.ts | 4 ++-- 3 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 coffeeify/coffeeify-tests.ts create mode 100644 coffeeify/coffeeify.d.ts diff --git a/coffeeify/coffeeify-tests.ts b/coffeeify/coffeeify-tests.ts new file mode 100644 index 000000000..753f68e79 --- /dev/null +++ b/coffeeify/coffeeify-tests.ts @@ -0,0 +1,15 @@ +/// + +import coffeeify = require('coffeeify'); + +coffeeify.sourceMap = false; + +var isCoffee = coffeeify.isCoffee('foo.coffee'); +var isLiterate = coffeeify.isLiterate('bar.coffee'); +coffeeify.compile('out.js', 'console.log 42', (err, compiled) => { + console.log(err); + console.log(compiled); +}); + +coffeeify('test.coffee').end(); + diff --git a/coffeeify/coffeeify.d.ts b/coffeeify/coffeeify.d.ts new file mode 100644 index 000000000..9651cdb15 --- /dev/null +++ b/coffeeify/coffeeify.d.ts @@ -0,0 +1,37 @@ +// Type definitions for coffeeify +// Project: https://github.com/jnordberg/coffeeify +// Definitions by: Qubo +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "coffeeify" { + import through = require('through'); + + namespace coffeeify { + interface Coffeeify { + isCoffee(file: string): boolean; + isLiterate(file: string): boolean; + sourceMap: boolean; + compile(file: string, data: string, callback: Callback): void; + (file: string): through.ThroughStream; + } + + interface Callback { + (error: ParseError, compiled: string): void; + } + + interface ParseError extends SyntaxError { + new(error: any, src: string, file: string): ParseError; + message: string; + line: number; + column: number; + annotated: string; + } + } + + var coffeeify: coffeeify.Coffeeify; + + export = coffeeify; +} + diff --git a/through/through.d.ts b/through/through.d.ts index 1491085a2..6e13e4d62 100644 --- a/through/through.d.ts +++ b/through/through.d.ts @@ -8,7 +8,7 @@ declare module "through" { import stream = require("stream"); - function through(write?: (data) => void, + function through(write?: (data: any) => void, end?: () => void, opts?: { autoDestroy: boolean; @@ -21,4 +21,4 @@ declare module "through" { } export = through; -} \ No newline at end of file +} From 4b1df53739e42b31b1f56c83c40b7c78c1f1497b Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Wed, 26 Aug 2015 16:10:37 +0200 Subject: [PATCH 03/11] Changed the easings from functions that return functions, to just functions --- fabricjs/fabricjs.d.ts | 64 ++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/fabricjs/fabricjs.d.ts b/fabricjs/fabricjs.d.ts index 0eb6bacb7..d4ac5ad75 100644 --- a/fabricjs/fabricjs.d.ts +++ b/fabricjs/fabricjs.d.ts @@ -4149,37 +4149,41 @@ declare module fabric { requestAnimFrame(callback: Function): void; } + interface IUtilAminEaseFunction { + (t: number, b: number, c: number, d: number): number; + } + interface IUtilAnimEase { - easeInBack(): Function; - easeInBounce(): Function; - easeInCirc(): Function; - easeInCubic(): Function; - easeInElastic(): Function; - easeInExpo(): Function; - easeInOutBack(): Function; - easeInOutBounce(): Function; - easeInOutCirc(): Function; - easeInOutCubic(): Function; - easeInOutElastic(): Function; - easeInOutExpo(): Function; - easeInOutQuad(): Function; - easeInOutQuart(): Function; - easeInOutQuint(): Function; - easeInOutSine(): Function; - easeInQuad(): Function; - easeInQuart(): Function; - easeInQuint(): Function; - easeInSine(): Function; - easeOutBack(): Function; - easeOutBounce(): Function; - easeOutCirc(): Function; - easeOutCubic(): Function; - easeOutElastic(): Function; - easeOutExpo(): Function; - easeOutQuad(): Function; - easeOutQuart(): Function; - easeOutQuint(): Function; - easeOutSine(): Function; + easeInBack: IUtilAminEaseFunction; + easeInBounce: IUtilAminEaseFunction; + easeInCirc: IUtilAminEaseFunction; + easeInCubic: IUtilAminEaseFunction; + easeInElastic: IUtilAminEaseFunction; + easeInExpo: IUtilAminEaseFunction; + easeInOutBack: IUtilAminEaseFunction; + easeInOutBounce: IUtilAminEaseFunction; + easeInOutCirc: IUtilAminEaseFunction; + easeInOutCubic: IUtilAminEaseFunction; + easeInOutElastic: IUtilAminEaseFunction; + easeInOutExpo: IUtilAminEaseFunction; + easeInOutQuad: IUtilAminEaseFunction; + easeInOutQuart: IUtilAminEaseFunction; + easeInOutQuint: IUtilAminEaseFunction; + easeInOutSine: IUtilAminEaseFunction; + easeInQuad: IUtilAminEaseFunction; + easeInQuart: IUtilAminEaseFunction; + easeInQuint: IUtilAminEaseFunction; + easeInSine: IUtilAminEaseFunction; + easeOutBack: IUtilAminEaseFunction; + easeOutBounce: IUtilAminEaseFunction; + easeOutCirc: IUtilAminEaseFunction; + easeOutCubic: IUtilAminEaseFunction; + easeOutElastic: IUtilAminEaseFunction; + easeOutExpo: IUtilAminEaseFunction; + easeOutQuad: IUtilAminEaseFunction; + easeOutQuart: IUtilAminEaseFunction; + easeOutQuint: IUtilAminEaseFunction; + easeOutSine: IUtilAminEaseFunction; } interface IUtilArc { From 733d010a3f76153d5660073baf660ef9b2e4e009 Mon Sep 17 00:00:00 2001 From: "chocolatechipui@sourcebits.com" Date: Wed, 26 Aug 2015 12:18:28 -0700 Subject: [PATCH 04/11] Updated to 3.9.1. New types for changes to navigation API. --- chui/chui-tests.js | 91 ++++++++++++++++++++++++++++++++++++++++++++++ chui/chui-tests.ts | 1 + chui/chui.d.ts | 74 ++++++++++++++++++++++++++++++++++++- 3 files changed, 164 insertions(+), 2 deletions(-) create mode 100644 chui/chui-tests.js diff --git a/chui/chui-tests.js b/chui/chui-tests.js new file mode 100644 index 000000000..92c2da5fa --- /dev/null +++ b/chui/chui-tests.js @@ -0,0 +1,91 @@ +/// +/// +$(function () { + /** + * Test static methods: + */ + var concatenatedText = $.concat("This", "is", "text", "to", "contatenate."); + $.forEach([1, 2, 3], function (ctx) { + return ctx; + }); + $.forEach([1, 2, 3], function (ctx, idx) { + return idx; + }); + var isiPhone = $.isiPhone; + var isAndroid = $.isAndroid; + var isWinPhone = $.isWinPhone; + $('li').on($.eventStart, function () { + return; + }); + $('li').on($.eventEnd, function () { + return; + }); + $('li').on($.eventMove, function () { + return; + }); + $('li').on($.eventCancel, function () { + return; + }); + var browserVersion = $.browserVersion(); + $.UIHideNavBar(); + $.UIShowNavBar(); + $.UIGoToArticle("#main"); + $.UIGoBack(); + $.UIGoBackToArticle("#main"); + $.UIEnableBrowserHashModification(); + $.UIBlock(); + $.UIBlock(.5); + $.UIUnblock(); + $.UIPopup({ id: "myPopup", message: 'Hello!!!' }); + $.UIPopup({ message: 'Hello!!!', title: "Whatever", callback: $.noop }); + $.UIPopup({ message: 'Hello!!!', cancelButton: "Forget It!", continueButton: "OK" }); + $.UIPopover({ id: "myPopover" }); + $.UIPopover({ callback: function () { } }); + $.UIPopover({ title: "Whatever" }); + $.UIPopover({ id: "myPopover", callback: function () { }, title: "Whatever" }); + $.UIPopoverClose(); + $.UICreateSegmented({ id: "mySegmentedControl", labels: ['first', 'second', 'third'], selected: 0, className: "special" }); + $.UIPaging(); + $.UISheet({ id: "mySheet", listClass: "specialList", background: 'red', handle: false }); + $.UIShowSheet("#mySheet"); + $.UIHideSheet(); + $.UISlideout({ dynamic: false, callback: $.noop }); + var myStepper = $('#myStepper'); + $.UIResetStepper(myStepper); + $.UICreateSwitch({ id: "mySwitch", value: 5, checked: "true", callback: $.noop }); + $.UITabbar({ tabs: 3, labels: ["one", "two", "three"], selected: 2 }); + $.UISearch({ articleId: "#main", placeholder: "Looking?", results: 10 }); + var carouselPanels = $("
  • 1
  • 2
  • 3
  • "); + $.UISetupCarousel({ target: "#carousel", panels: carouselPanels }); + $.UIBindData(); + $.UIBindData("#myBoundData"); + $.UIUnBindData(); + $.UIUnBindData("#myBoundData"); + /** + * Test plugin methods: + */ + $("li").forEach(function (ctx, idx) { + console.log(ctx.nodeName + ": " + idx); + }); + $('li').iz(".selected").hide(); + $('li').iznt(".selected").show(); + $('li').haz("span").hide(); + $('li').haznt("span").show(); + $('li').hazClass(".selected").hide(); + $('li').hazntClass(".selected").show(); + $('li').hazAttr("disabled").hide(); + $('li').hazntAttr("disabled").show(); + $('#main').bind("singletap", function () { + return; + }); + $('#main').UICenter(); + $('#main').UIBusy({ size: "120px", color: "red", duration: "5000ms" }); + $('#myPopup').UIPopupClose(); + $('#mySegementedControl').UISegmented({ selected: 2, callback: $.noop }); + $("#panelToggler").UIPanelToggle("#togglePanels", $.noop); + $('#editList').UIEditList({ callback: $.noop, deletable: false, movable: true }); + $('#mySelectList').UISelectList(); + $('#myStepper').UIStepper({ start: 1, end: 10, defaultValue: 5 }); + $('#mySwitch').UISwitch(); + $('#myRangeControl').UIRange(); +}); diff --git a/chui/chui-tests.ts b/chui/chui-tests.ts index 98070b433..d4f7be5f3 100644 --- a/chui/chui-tests.ts +++ b/chui/chui-tests.ts @@ -37,6 +37,7 @@ $(function() { $.UIGoToArticle("#main"); $.UIGoBack(); $.UIGoBackToArticle("#main"); + $.UIEnableBrowserHashModification(); $.UIBlock(); $.UIBlock(.5); $.UIUnblock(); diff --git a/chui/chui.d.ts b/chui/chui.d.ts index 2f68ae454..5a7d41a5b 100644 --- a/chui/chui.d.ts +++ b/chui/chui.d.ts @@ -1,8 +1,8 @@ -// Type definitions for chui v3.9.0 +// Type definitions for chui v3.9.1 // Project: https://github.com/chocolatechipui/chocolatechip-ui // Definitions by: Robert Biggs // Definitions: https://github.com/borisyankov/DefinitelyTyped -// ChocolateChip-UI 3.9.0 +// ChocolateChip-UI 3.9.1 /** These TypeScript delcarations for ChocolateChip-UI contain interfaces for both ChocolateChipJS and jQuery. Depending on which library you are using, you will get the type interfaces appropriate for it. */ @@ -89,6 +89,17 @@ interface ChocolateChipStatic { */ isNavigating: boolean; + /** + * Tell ChocolateChip-UI to not modify window hash during navigation. + * The default value is false. + */ + UIBrowserHashModification: boolean; + + /** + * Method to tell ChocolateChip-UI to register navigation history on Window hash. + */ + UIEnableBrowserHashModification(): void; + /** * Navigate to the article indicated by the provided destination ID. This enters the destination into the navigation history array. * @@ -784,6 +795,17 @@ interface JQueryStatic { */ isNavigating: boolean; + /** + * Tell ChocolateChip-UI to not modify window hash during navigation. + * The default value is false. + */ + UIBrowserHashModification: boolean; + + /** + * Method to tell ChocolateChip-UI to register navigation history on Window hash. + */ + UIEnableBrowserHashModification(): void; + /** * Navigate to the article indicated by the provided destination ID. This enters the destination into the navigation history array. * @@ -1014,6 +1036,54 @@ interface JQueryStatic { */ UIUnBindData(controller?: string): void; + /** + * Object used to store string templates and parsed templates. + * + * @param string A string defining the template. + * @param string A label used to access an object's properties in the template. If none is provided it defaults to "data": [[= data.name]]. + * @return void + */ + templates: Object; + + /** + * This method returns a parsed template. + * + */ + template: { + + /** + * This method parses a string and an optoinal variable name and returns a parsed template in the form of a function. You can then pass this function data to get rendered nodes. + * + * @param template A string of markup to use as a template. + * @param variable An option name to use in the template. If it were "myData": [[= myData.name]]. Otherwise it defaults to "data": [[= data.name]]. + * @return A function. + */ + (template: string, variable?: string): Function; + + /** + * A method to repeated output a template. + * + * @param element The target container into which the content will be inserted. + * @param template A string of markup. + * @param data The iterable data the template will consume. + * @return void. + */ + repeater: (element: JQuery, template: string, data: any) => void; + + /** + * A object that holds the reference to the controller for a repeater. + * This is used to cache the data that a repeater uses. After the repeater is rendered, the reference is deleted from this object. + * + */ + data: { + repeaterName?: any; + }; + + /** + * Use this value to output an index value in a template repeater. + */ + index: number; + }; } /** From 7b9ecbce8731cd3ed8f47ddfc02a229adfb0b1ce Mon Sep 17 00:00:00 2001 From: Jason Saelhof Date: Wed, 26 Aug 2015 14:07:04 -0600 Subject: [PATCH 05/11] Fix type of createjs.Ticker.paused --- easeljs/easeljs.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easeljs/easeljs.d.ts b/easeljs/easeljs.d.ts index 8545b0b5e..a46f2484e 100644 --- a/easeljs/easeljs.d.ts +++ b/easeljs/easeljs.d.ts @@ -925,7 +925,7 @@ declare module createjs { static framerate: number; static interval: number; static maxDelta: number; - static paused: number; + static paused: boolean; static RAF: string; static RAF_SYNCHED: string; static TIMEOUT: string; From 9e31d606318dd9570bbb98c6cf9a3036f858fffc Mon Sep 17 00:00:00 2001 From: "chocolatechipui@sourcebits.com" Date: Wed, 26 Aug 2015 21:04:13 -0700 Subject: [PATCH 06/11] Removed unnecessary test result. --- chui/chui-tests.js | 91 ---------------------------------------------- 1 file changed, 91 deletions(-) delete mode 100644 chui/chui-tests.js diff --git a/chui/chui-tests.js b/chui/chui-tests.js deleted file mode 100644 index 92c2da5fa..000000000 --- a/chui/chui-tests.js +++ /dev/null @@ -1,91 +0,0 @@ -/// -/// -$(function () { - /** - * Test static methods: - */ - var concatenatedText = $.concat("This", "is", "text", "to", "contatenate."); - $.forEach([1, 2, 3], function (ctx) { - return ctx; - }); - $.forEach([1, 2, 3], function (ctx, idx) { - return idx; - }); - var isiPhone = $.isiPhone; - var isAndroid = $.isAndroid; - var isWinPhone = $.isWinPhone; - $('li').on($.eventStart, function () { - return; - }); - $('li').on($.eventEnd, function () { - return; - }); - $('li').on($.eventMove, function () { - return; - }); - $('li').on($.eventCancel, function () { - return; - }); - var browserVersion = $.browserVersion(); - $.UIHideNavBar(); - $.UIShowNavBar(); - $.UIGoToArticle("#main"); - $.UIGoBack(); - $.UIGoBackToArticle("#main"); - $.UIEnableBrowserHashModification(); - $.UIBlock(); - $.UIBlock(.5); - $.UIUnblock(); - $.UIPopup({ id: "myPopup", message: 'Hello!!!' }); - $.UIPopup({ message: 'Hello!!!', title: "Whatever", callback: $.noop }); - $.UIPopup({ message: 'Hello!!!', cancelButton: "Forget It!", continueButton: "OK" }); - $.UIPopover({ id: "myPopover" }); - $.UIPopover({ callback: function () { } }); - $.UIPopover({ title: "Whatever" }); - $.UIPopover({ id: "myPopover", callback: function () { }, title: "Whatever" }); - $.UIPopoverClose(); - $.UICreateSegmented({ id: "mySegmentedControl", labels: ['first', 'second', 'third'], selected: 0, className: "special" }); - $.UIPaging(); - $.UISheet({ id: "mySheet", listClass: "specialList", background: 'red', handle: false }); - $.UIShowSheet("#mySheet"); - $.UIHideSheet(); - $.UISlideout({ dynamic: false, callback: $.noop }); - var myStepper = $('#myStepper'); - $.UIResetStepper(myStepper); - $.UICreateSwitch({ id: "mySwitch", value: 5, checked: "true", callback: $.noop }); - $.UITabbar({ tabs: 3, labels: ["one", "two", "three"], selected: 2 }); - $.UISearch({ articleId: "#main", placeholder: "Looking?", results: 10 }); - var carouselPanels = $("
  • 1
  • 2
  • 3
  • "); - $.UISetupCarousel({ target: "#carousel", panels: carouselPanels }); - $.UIBindData(); - $.UIBindData("#myBoundData"); - $.UIUnBindData(); - $.UIUnBindData("#myBoundData"); - /** - * Test plugin methods: - */ - $("li").forEach(function (ctx, idx) { - console.log(ctx.nodeName + ": " + idx); - }); - $('li').iz(".selected").hide(); - $('li').iznt(".selected").show(); - $('li').haz("span").hide(); - $('li').haznt("span").show(); - $('li').hazClass(".selected").hide(); - $('li').hazntClass(".selected").show(); - $('li').hazAttr("disabled").hide(); - $('li').hazntAttr("disabled").show(); - $('#main').bind("singletap", function () { - return; - }); - $('#main').UICenter(); - $('#main').UIBusy({ size: "120px", color: "red", duration: "5000ms" }); - $('#myPopup').UIPopupClose(); - $('#mySegementedControl').UISegmented({ selected: 2, callback: $.noop }); - $("#panelToggler").UIPanelToggle("#togglePanels", $.noop); - $('#editList').UIEditList({ callback: $.noop, deletable: false, movable: true }); - $('#mySelectList').UISelectList(); - $('#myStepper').UIStepper({ start: 1, end: 10, defaultValue: 5 }); - $('#mySwitch').UISwitch(); - $('#myRangeControl').UIRange(); -}); From 753962277f3742daf681cc3bb29c39b05b2074b0 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Thu, 27 Aug 2015 13:06:27 +0200 Subject: [PATCH 07/11] Fixed spelling error --- pixi.js/pixi.js.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixi.js/pixi.js.d.ts b/pixi.js/pixi.js.d.ts index 8e83cbf1e..a4e0da88c 100644 --- a/pixi.js/pixi.js.d.ts +++ b/pixi.js/pixi.js.d.ts @@ -762,7 +762,7 @@ declare module PIXI { fragmentSrc: string; init(): void; - cachUniformLocations(keys: string): void; + cacheUniformLocations(keys: string): void; cacheAttributeLocations(keys: string): void; compile(): WebGLProgram; syncUniform(uniform: any): void; From e3ac8a3f745980a22ae8a7647595c2a82ebe1698 Mon Sep 17 00:00:00 2001 From: Benjamin Bock Date: Thu, 27 Aug 2015 21:01:42 +0200 Subject: [PATCH 08/11] Mousetrap global-bind plugin should match upstream The official Mousetrap global-bind plugin uses bindGlobal as method name. See https://github.com/ccampbell/mousetrap/tree/master/plugins/global-bind --- mousetrap/mousetrap-global-bind.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mousetrap/mousetrap-global-bind.d.ts b/mousetrap/mousetrap-global-bind.d.ts index ecfdd2ff2..5e56d2107 100644 --- a/mousetrap/mousetrap-global-bind.d.ts +++ b/mousetrap/mousetrap-global-bind.d.ts @@ -6,6 +6,6 @@ /// interface MousetrapStatic { - globalBind(keys: string, callback: (e: ExtendedKeyboardEvent, combo: string) => any, action?: string): void; - globalBind(keyArray: string[], callback: (e: ExtendedKeyboardEvent, combo: string) => any, action?: string): void; + bindGlobal(keys: string, callback: (e: ExtendedKeyboardEvent, combo: string) => any, action?: string): void; + bindGlobal(keyArray: string[], callback: (e: ExtendedKeyboardEvent, combo: string) => any, action?: string): void; } From 2b13484b4d27df4074ede8ba64c4a968deadf2ea Mon Sep 17 00:00:00 2001 From: Benjamin Bock Date: Thu, 27 Aug 2015 21:02:39 +0200 Subject: [PATCH 09/11] Update mousetrap-global-bind-tests.ts --- mousetrap/mousetrap-global-bind-tests.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mousetrap/mousetrap-global-bind-tests.ts b/mousetrap/mousetrap-global-bind-tests.ts index 92374d862..79620e24c 100644 --- a/mousetrap/mousetrap-global-bind-tests.ts +++ b/mousetrap/mousetrap-global-bind-tests.ts @@ -1,14 +1,14 @@ /// -Mousetrap.globalBind('4', function() { console.log('4'); }); -Mousetrap.globalBind("?", function() { console.log('show shortcuts!'); }); -Mousetrap.globalBind('esc', function() { console.log('escape'); }, 'keyup'); +Mousetrap.bindGlobal('4', function() { console.log('4'); }); +Mousetrap.bindGlobal("?", function() { console.log('show shortcuts!'); }); +Mousetrap.bindGlobal('esc', function() { console.log('escape'); }, 'keyup'); // combinations -Mousetrap.globalBind('command+shift+K', function() { console.log('command shift k'); }); +Mousetrap.bindGlobal('command+shift+K', function() { console.log('command shift k'); }); // map multiple combinations to the same callback -Mousetrap.globalBind(['command+k', 'ctrl+k'], function() { +Mousetrap.bindGlobal(['command+k', 'ctrl+k'], function() { console.log('command k or control k'); // return false to prevent default browser behavior @@ -17,15 +17,15 @@ Mousetrap.globalBind(['command+k', 'ctrl+k'], function() { }); // gmail style sequences -Mousetrap.globalBind('g i', function() { console.log('go to inbox'); }); -Mousetrap.globalBind('* a', function() { console.log('select all'); }); +Mousetrap.bindGlobal('g i', function() { console.log('go to inbox'); }); +Mousetrap.bindGlobal('* a', function() { console.log('select all'); }); // konami code! -Mousetrap.globalBind('up up down down left right left right b a enter', function() { +Mousetrap.bindGlobal('up up down down left right left right b a enter', function() { console.log('konami code'); }); -Mousetrap.globalBind(['ctrl+s', 'meta+s'], (e, combo) => { +Mousetrap.bindGlobal(['ctrl+s', 'meta+s'], (e, combo) => { if (e.preventDefault) { e.preventDefault(); } else { From d92492b8537d8e1eeac58bc6cc30ff7439d634f8 Mon Sep 17 00:00:00 2001 From: vvakame Date: Fri, 28 Aug 2015 23:51:58 +0900 Subject: [PATCH 10/11] fix vortex-web-client/vortex-web-client.d.ts --- vortex-web-client/vortex-web-client.d.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/vortex-web-client/vortex-web-client.d.ts b/vortex-web-client/vortex-web-client.d.ts index de665c780..bb038a6bd 100644 --- a/vortex-web-client/vortex-web-client.d.ts +++ b/vortex-web-client/vortex-web-client.d.ts @@ -482,7 +482,4 @@ declare module DDS { * Defines the core Vortex-Web-Client javascript library. It includes the JavaScript API for DDS. This API allows * web applications to share data among them as well as with native DDS applications. */ -declare -var dds:typeof DDS; - - +declare var dds:typeof DDS; From ef81ae6648fd0f3519e463c898433424f00b78e3 Mon Sep 17 00:00:00 2001 From: vvakame Date: Fri, 28 Aug 2015 23:55:35 +0900 Subject: [PATCH 11/11] fix loglevel/loglevel.d.ts --- loglevel/loglevel.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/loglevel/loglevel.d.ts b/loglevel/loglevel.d.ts index 01b80b722..9f3c53f5a 100644 --- a/loglevel/loglevel.d.ts +++ b/loglevel/loglevel.d.ts @@ -98,5 +98,4 @@ declare module loglevel { export function noConflict():any; } -declare -var log:typeof loglevel; +declare var log:typeof loglevel;