From 00aa560a49892cd736758f9a7a121097c95a84cd Mon Sep 17 00:00:00 2001 From: asankaf Date: Sat, 21 Jan 2017 12:58:53 +0530 Subject: [PATCH 01/54] Updates in the worksheet row type enum - Since couple of releases, worksheet row type enum values used for groupHeader and groupFooter were updated to group-header and group-footer. - New values are used in src\js\kendo.excel.js (lines 180 and 226) - v2017.1.118 --- kendo-ui/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kendo-ui/index.d.ts b/kendo-ui/index.d.ts index 5d6e4ec0a8..ecdbffae66 100644 --- a/kendo-ui/index.d.ts +++ b/kendo-ui/index.d.ts @@ -18307,7 +18307,7 @@ declare namespace kendo.ooxml { cells?: WorkbookSheetRowCell[]; index?: number; height?: number; - type?: "header" | "footer" | "groupHeader" | "groupFooter" | "data"; + type?: "header" | "footer" | "group-header" | "group-footer" | "data"; } interface WorkbookSheet { From 1652209bad56af434c6e9074955002d2cb2bf4b0 Mon Sep 17 00:00:00 2001 From: Chris Barr Date: Sun, 22 Jan 2017 21:00:24 -0500 Subject: [PATCH 02/54] Add missing configuration options & tests to angular-bootstrap-ui --- .../angular-ui-bootstrap-tests.ts | 25 ++++- angular-ui-bootstrap/index.d.ts | 95 +++++++++++++++++++ 2 files changed, 118 insertions(+), 2 deletions(-) diff --git a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts b/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts index 16eaff3b39..b14af506b6 100644 --- a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts +++ b/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts @@ -7,6 +7,7 @@ testApp.config(( $buttonConfig: ng.ui.bootstrap.IButtonConfig, $datepickerConfig: ng.ui.bootstrap.IDatepickerConfig, $datepickerPopupConfig: ng.ui.bootstrap.IDatepickerPopupConfig, + $dropdownConfig: ng.ui.bootstrap.IDropdownConfig, $modalProvider: ng.ui.bootstrap.IModalProvider, $paginationConfig: ng.ui.bootstrap.IPaginationConfig, $pagerConfig: ng.ui.bootstrap.IPagerConfig, @@ -47,13 +48,18 @@ testApp.config(( $datepickerConfig.showWeeks = false; $datepickerConfig.startingDay = 1; $datepickerConfig.yearRange = 10; - - + $datepickerConfig.monthColumns = 3; + $datepickerConfig.yearColumns = 9; + $datepickerConfig.yearRows = 6; + $datepickerConfig.ngModelOptions.allowInvalid = false; + $datepickerConfig.ngModelOptions.timezone = "EST"; + $datepickerConfig.ngModelOptions.updateOn = "click"; /** * $datepickerPopupConfig tests */ + $datepickerPopupConfig.altInputFormats = ["mm/dd/YYYY", "mm-dd-YY"]; $datepickerPopupConfig.appendToBody = true; $datepickerPopupConfig.currentText = 'Select Today'; $datepickerPopupConfig.clearText = 'Reset Selection'; @@ -63,8 +69,18 @@ testApp.config(( $datepickerPopupConfig.datepickerPopupTemplateUrl = 'template.html'; $datepickerPopupConfig.datepickerTemplateUrl = 'template.html'; $datepickerPopupConfig.html5Types.date = 'MM-dd-yyyy'; + $datepickerPopupConfig.html5Types['datetime-local'] = 'yyyy-MM-ddTHH:mm:ss.sss'; + $datepickerPopupConfig.html5Types.month = 'yyyy-MM'; $datepickerPopupConfig.onOpenFocus = false; $datepickerPopupConfig.showButtonBar = false; + $datepickerPopupConfig.placement = "auto bottom left"; + + + /** + * $dropdownConfig tests + */ + $dropdownConfig.appendToOpenClass = "some-thing"; + $dropdownConfig.openClass = "show"; /** @@ -77,6 +93,7 @@ testApp.config(( * $paginationConfig tests */ $paginationConfig.boundaryLinks = true; + $paginationConfig.boundaryLinkNumbers = true; $paginationConfig.directionLinks = false; $paginationConfig.firstText = 'First Page'; $paginationConfig.itemsPerPage = 25; @@ -88,6 +105,7 @@ testApp.config(( $paginationConfig.rotate = false; $paginationConfig.templateUrl = 'template.html'; $paginationConfig.totalItems = 13; + $paginationConfig.forceEllipses = true; /** @@ -121,11 +139,14 @@ testApp.config(( $timepickerConfig.hourStep = 2; $timepickerConfig.meridians = ['-AM-', '-PM-']; $timepickerConfig.minuteStep = 5; + $timepickerConfig.secondStep = 5; $timepickerConfig.mousewheel = false; $timepickerConfig.readonlyInput = true; $timepickerConfig.showMeridian = false; $timepickerConfig.arrowkeys = false; $timepickerConfig.showSpinners = false; + $timepickerConfig.showSeconds = true; + $timepickerConfig.templateUrl = "template.html"; /** * $tooltipProvider tests diff --git a/angular-ui-bootstrap/index.d.ts b/angular-ui-bootstrap/index.d.ts index 73043c4e7a..b5b4e1a5e6 100644 --- a/angular-ui-bootstrap/index.d.ts +++ b/angular-ui-bootstrap/index.d.ts @@ -11,6 +11,7 @@ export type IAccordionConfig = angular.ui.bootstrap.IAccordionConfig; export type IButtonConfig = angular.ui.bootstrap.IButtonConfig; export type IDatepickerConfig = angular.ui.bootstrap.IDatepickerConfig; export type IDatepickerPopupConfig = angular.ui.bootstrap.IDatepickerPopupConfig; +export type IDropdownConfig = angular.ui.bootstrap.IDropdownConfig; export type IModalProvider = angular.ui.bootstrap.IModalProvider; export type IModalService = angular.ui.bootstrap.IModalService; export type IModalServiceInstance = angular.ui.bootstrap.IModalServiceInstance; @@ -54,6 +55,11 @@ declare module 'angular' { toggleEvent?: string; } + interface IDropdownConfigNgOptions extends angular.INgModelOptions { + allowInvalid?: boolean; + timezone?: string; + } + interface IDatepickerConfig { /** * Format of day in month. @@ -166,9 +172,45 @@ declare module 'angular' { * @default false */ shortcutPropagation?: boolean; + + /** + * The number of columns displayed in month selection. + * + * @default 3 + */ + monthColumns?: number; + + /** + * The number of columns displayed in year selection. + * + * @default 5 + */ + yearColumns?: number; + + /** + * The number of rows displayed in year selection + * + * @default 4 + */ + yearRows?: number; + + /** + * All supported angular ngModelOptions plus some + * + * @default {} + */ + ngModelOptions?: IDropdownConfigNgOptions } interface IDatepickerPopupConfig { + + /** + * A list of alternate formats acceptable for manual entry. + * + * @default [] + */ + altInputFormats?: string[]; + /** * The format for displayed dates. * @@ -247,8 +289,26 @@ declare module 'angular' { * @default true */ onOpenFocus?: boolean; + + /** + * Passing in 'auto' separated by a space before the placement will enable auto positioning, e.g: "auto bottom-left". The popup will attempt to position where it fits in the closest scrollable ancestor. + * + * @default 'auto bottom-left' + */ + placement?: string; } + interface IDropdownConfig { + /** + * @default: 'uib-dropdown-open' + */ + appendToOpenClass?: string; + + /** + * @default: 'open' + */ + openClass?: string; + } interface IModalProvider { /** @@ -543,6 +603,13 @@ declare module 'angular' { */ boundaryLinks?: boolean; + /** + * Whether to always display the first and last page numbers. If max-size is smaller than the number of pages, then the first and last page numbers are still shown with ellipses in-between as necessary. NOTE: max-size refers to the center of the range. This option may add up to 2 more numbers on each side of the displayed range for the end value and what would be an ellipsis but is replaced by a number because it is sequential. + * + * @default false + */ + boundaryLinkNumbers?: boolean; + /** * Text for First button. * @@ -563,6 +630,13 @@ declare module 'angular' { * @default 'template/pagination/pagination.html' */ templateUrl?: string; + + /** + * Also displays ellipses when rotate is true and max-size is smaller than the number of pages. + * + * @default false + */ + forceEllipses?: boolean; } interface IPagerConfig { @@ -679,6 +753,13 @@ declare module 'angular' { */ minuteStep?: number; + /** + * Number of seconds to increase or decrease when using a button. + * + * @default 1 + */ + secondStep?: number; + /** * Whether to display 12H or 24H mode. * @@ -720,6 +801,20 @@ declare module 'angular' { * @default true */ showSpinners?: boolean; + + /** + * Show seconds input. + * + * @default false + */ + showSeconds?: boolean; + + /** + * Add the ability to override the template used on the component. + * + * @default 'uib/template/timepicker/timepicker.html' + */ + templateUrl?: string; } From 392b91f8d5375288f0041d1b6b2c01566c1eae1c Mon Sep 17 00:00:00 2001 From: keika299 Date: Mon, 23 Jan 2017 16:50:02 +0900 Subject: [PATCH 03/54] add autosize method --- autosize/autosize-tests.ts | 18 ++++++++++++++++++ autosize/index.d.ts | 6 +++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/autosize/autosize-tests.ts b/autosize/autosize-tests.ts index 74be703a94..a7eea57a62 100644 --- a/autosize/autosize-tests.ts +++ b/autosize/autosize-tests.ts @@ -8,3 +8,21 @@ autosize(document.querySelector('textarea')); // from a single element autosize(document.getElementById('my-textarea')); + +// update a NodeList +autosize.update(document.querySelectorAll('textarea')); + +// update a single Node +autosize.update(document.querySelector('textarea')); + +// update a single element +autosize.update(document.getElementById('my-textarea')); + +// destroy a NodeList +autosize.destroy(document.querySelectorAll('textarea')); + +// destroy a single Node +autosize.destroy(document.querySelector('textarea')); + +// destroy a single element +autosize.destroy(document.getElementById('my-textarea')); diff --git a/autosize/index.d.ts b/autosize/index.d.ts index 5ea76d0472..0886904e3f 100644 --- a/autosize/index.d.ts +++ b/autosize/index.d.ts @@ -1,12 +1,16 @@ // Type definitions for jquery.autosize 3.0.7 // Project: http://www.jacklmoore.com/autosize/ -// Definitions by: Aaron T. King +// Definitions by: Aaron T. King , keika299 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace autosize { interface AutosizeStatic { (el: Element): void; (el: NodeList): void; + update(el: Element): void; + update(el: NodeList): void; + destroy(el: Element): void; + destroy(el: NodeList): void; } } From 52ad6adaa2a6dd74c168164c178fe33dd63f21e7 Mon Sep 17 00:00:00 2001 From: Robin maenhaut Date: Mon, 23 Jan 2017 09:05:49 +0100 Subject: [PATCH 04/54] Add support for custom style object in the PNotifyOptions --- jquery.pnotify/index.d.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/jquery.pnotify/index.d.ts b/jquery.pnotify/index.d.ts index 668590e4d6..c0ab267b7d 100644 --- a/jquery.pnotify/index.d.ts +++ b/jquery.pnotify/index.d.ts @@ -6,7 +6,7 @@ /// type NoticeTypeOptions = "notice" | "info" | "success" | "error"; -type StylingOptions = "brighttheme" | "jqueryui" | "bootstrap2" | "bootstrap3" | "fontawesome"; +type StylingOptions = "brighttheme" | "jqueryui" | "bootstrap2" | "bootstrap3" | "fontawesome" | PNotifyStyling; type StateOptions = "initializing" | "opening" | "open" | "closing" | "closed"; interface PNotifyStack { @@ -134,7 +134,7 @@ interface PNotifyOptions { */ text_escape?: boolean; /** - * What styling classes to use. (Can be either "brighttheme", "jqueryui", "bootstrap2", "bootstrap3", or "fontawesome".) + * What styling classes to use. (Can be either "brighttheme", "jqueryui", "bootstrap2", "bootstrap3", "fontawesome" or a custom style object) */ styling?: StylingOptions; /** @@ -257,6 +257,18 @@ interface PNotifyOptions { labels?: PNotifyLabel; } +interface PNotifyStyling { + container?: string, + notice?: string, + notice_icon?: string, + info?: string, + info_icon?: string, + success?: string, + success_icon?: string, + error?: string, + error_icon?: string +} + interface PNotify { /** From ad57871fe05c3a46e172a702e91b7ff20a143778 Mon Sep 17 00:00:00 2001 From: Robin maenhaut Date: Mon, 23 Jan 2017 09:33:21 +0100 Subject: [PATCH 05/54] Include pnotify.buttons styling extensions --- jquery.pnotify/index.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jquery.pnotify/index.d.ts b/jquery.pnotify/index.d.ts index c0ab267b7d..f15150ad20 100644 --- a/jquery.pnotify/index.d.ts +++ b/jquery.pnotify/index.d.ts @@ -266,7 +266,10 @@ interface PNotifyStyling { success?: string, success_icon?: string, error?: string, - error_icon?: string + error_icon?: string, + closer?: string, + pin_down?: string, + pin_up?: string } interface PNotify { From 4ff4f8d4fc9d5266ffbea44bc12391eefbb39695 Mon Sep 17 00:00:00 2001 From: Robin maenhaut Date: Mon, 23 Jan 2017 09:37:27 +0100 Subject: [PATCH 06/54] Add styling extensions for confirm, history and reference --- jquery.pnotify/index.d.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/jquery.pnotify/index.d.ts b/jquery.pnotify/index.d.ts index f15150ad20..7600c45a09 100644 --- a/jquery.pnotify/index.d.ts +++ b/jquery.pnotify/index.d.ts @@ -267,9 +267,24 @@ interface PNotifyStyling { success_icon?: string, error?: string, error_icon?: string, + // buttons closer?: string, pin_down?: string, - pin_up?: string + pin_up?: string, + // confirm + btn?: string, + btnhover?: string, + btnactive?: string, + btnfocus?: string, + input?: string, + text?: string, + // history + hi_menu?: string, + hi_btn?: string, + hi_btnhov?: string, + hi_hnd?: string, + // reference + athing?: string } interface PNotify { From 42636ca79f11b05f15bc5e5ceeb15d9ff2cea083 Mon Sep 17 00:00:00 2001 From: Robin maenhaut Date: Mon, 23 Jan 2017 09:51:05 +0100 Subject: [PATCH 07/54] Add test for the new styling object --- jquery.pnotify/index.d.ts | 2 +- jquery.pnotify/jquery.pnotify-tests.ts | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/jquery.pnotify/index.d.ts b/jquery.pnotify/index.d.ts index 7600c45a09..1d222efb26 100644 --- a/jquery.pnotify/index.d.ts +++ b/jquery.pnotify/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for jquery.pnotify 3.x // Project: https://github.com/sciactive/pnotify -// Definitions by: David Sichau +// Definitions by: David Sichau , Robin Maenhaut // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// diff --git a/jquery.pnotify/jquery.pnotify-tests.ts b/jquery.pnotify/jquery.pnotify-tests.ts index c9465e0444..41cd7d3fda 100644 --- a/jquery.pnotify/jquery.pnotify-tests.ts +++ b/jquery.pnotify/jquery.pnotify-tests.ts @@ -243,5 +243,24 @@ function test_pnotify() { animation: 'show' }); + new PNotify({ + title: 'Custom styling', + text: 'Test all custom styling properties', + styling: { + container: "alert", + notice: "alert-warning", + notice_icon: "fa fa-exclamation-circle", + info: "alert-info", + info_icon: "fa fa-info", + success: "alert-success", + success_icon: "fa fa-check", + error: "alert-danger", + error_icon: "fa fa-warning", + closer: "fa fa-times", + pin_up: "fa fa-pause", + pin_down: "fa fa-play" + } + }); + PNotify.removeAll(); } From 1f4489bff8ff00fbc82e2c4f92c51a458830e1f7 Mon Sep 17 00:00:00 2001 From: Craig Nishina Date: Thu, 19 Jan 2017 12:00:10 -0800 Subject: [PATCH 08/54] types(jasminewd): add new typings for jasminewd --- jasminewd2/index.d.ts | 73 +++++++++++++++++++ jasminewd2/jasminewd2-tests.ts | 123 +++++++++++++++++++++++++++++++++ jasminewd2/tsconfig.json | 20 ++++++ jasminewd2/tslint.json | 6 ++ 4 files changed, 222 insertions(+) create mode 100644 jasminewd2/index.d.ts create mode 100644 jasminewd2/jasminewd2-tests.ts create mode 100644 jasminewd2/tsconfig.json create mode 100644 jasminewd2/tslint.json diff --git a/jasminewd2/index.d.ts b/jasminewd2/index.d.ts new file mode 100644 index 0000000000..cff5236b50 --- /dev/null +++ b/jasminewd2/index.d.ts @@ -0,0 +1,73 @@ +// Type definitions for jasminewd2 2.0 +// Project: https://github.com/angular/jasminewd +// Definitions by: Sammy Jelin +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare function it(expectation: string, assertion?: () => Promise, timeout?: number): void; +declare function fit(expectation: string, assertion?: () => Promise, timeout?: number): void; +declare function xit(expectation: string, assertion?: () => Promise, timeout?: number): void; +declare function beforeEach(action: () => Promise, timeout?: number): void; +declare function afterEach(action: () => Promise, timeout?: number): void; +declare function beforeAll(action: () => Promise, timeout?: number): void; +declare function afterAll(action: () => Promise, timeout?: number): void; + +declare namespace jasmine { + // The global `Promise` type is too strict and kinda wrong + interface Promise { + then(onFulfill?: (value: T) => U | Promise, onReject?: (error: any) => U | Promise): Promise; + } + + interface Matchers { + toBe(expected: any, expectationFailOutput?: any): Promise; + toEqual(expected: any, expectationFailOutput?: any): Promise; + toMatch(expected: string | RegExp | Promise, expectationFailOutput?: any): Promise; + toBeDefined(expectationFailOutput?: any): Promise; + toBeUndefined(expectationFailOutput?: any): Promise; + toBeNull(expectationFailOutput?: any): Promise; + toBeNaN(): Promise; + toBeTruthy(expectationFailOutput?: any): Promise; + toBeFalsy(expectationFailOutput?: any): Promise; + toHaveBeenCalled(): Promise; + toHaveBeenCalledWith(...params: any[]): Promise; + toHaveBeenCalledTimes(expected: number | Promise): Promise; + toContain(expected: any, expectationFailOutput?: any): Promise; + toBeLessThan(expected: number | Promise, expectationFailOutput?: any): Promise; + toBeLessThanOrEqual(expected: number | Promise, expectationFailOutput?: any): Promise; + toBeGreaterThan(expected: number | Promise, expectationFailOutput?: any): Promise; + toBeGreaterThanOrEqual(expected: number | Promise, expectationFailOutput?: any): Promise; + toBeCloseTo(expected: number | Promise, precision?: any, expectationFailOutput?: any): Promise; + toThrow(expected?: any): Promise; + toThrowError(message?: string | RegExp | Promise): Promise; + toThrowError(expected?: new (...args: any[]) => Error | Promise Error>, message?: string | RegExp | Promise): Promise; + } + + function addMatchers(matchers: AsyncCustomMatcherFactories): void; + + interface Env { + addMatchers(matchers: AsyncCustomMatcherFactories): void; + } + + interface Spec { + addMatchers(matchers: AsyncCustomMatcherFactories): void; + } + + interface AsyncCustomMatcherFactories { + [index: string]: AsyncCustomMatcherFactory; + } + + interface AsyncCustomMatcherFactory { + (util: MatchersUtil, customEqualityTesters: CustomEqualityTester[]): AsyncCustomMatcher; + } + + interface AsyncCustomMatcher { + compare(actual: T, expected: T): AsyncCustomMatcherResult; + compare(actual: any, expected: any): AsyncCustomMatcherResult; + } + + interface AsyncCustomMatcherResult { + pass: boolean | Promise; + message?: string; + } +} diff --git a/jasminewd2/jasminewd2-tests.ts b/jasminewd2/jasminewd2-tests.ts new file mode 100644 index 0000000000..c6612ae422 --- /dev/null +++ b/jasminewd2/jasminewd2-tests.ts @@ -0,0 +1,123 @@ +let promise = new Promise((resolve, reject) => { + resolve(); +}); + +describe('jasminewd', () => { + describe('global it, fit, xit, before and after', () => { + it('should be able to return promises', () => { + return promise; + }); + + fit('should be able to return promises', () => { + return promise; + }); + + xit('should be able to return promises', () => { + return promise; + }); + + beforeEach(() => { + return promise; + }); + + afterEach(() => { + return promise; + }); + + beforeAll(() => { + return promise; + }); + + afterAll(() => { + return promise; + }); + }); + + describe('matchers', () => { + it('should work', () => { + let expectedAny: any; + let expectationFailOutputAny: any; + let expectedString: string; + let expectedNumber: number; + let expectedRegExp: RegExp; + let expectedPromiseString: Promise; + let expectedPromiseNumber: Promise; + let expectedPromiseRegExp: Promise; + let paramsAny: any[]; + let error: Error; + let errorPromise: Promise; + + expect(expectedAny).toBe(expectationFailOutputAny); + expect(expectedAny).toEqual(expectationFailOutputAny); + expect(expectedString).toMatch(expectationFailOutputAny); + expect(expectedRegExp).toMatch(expectationFailOutputAny); + expect(expectedPromiseString).toMatch(expectationFailOutputAny); + expect(expectedPromiseRegExp).toMatch(expectationFailOutputAny); + expect(expectationFailOutputAny).toBeDefined(); + expect(expectationFailOutputAny).toBeUndefined(); + expect(expectationFailOutputAny).toBeNull(); + expect(expectedAny).toBeNaN(); + expect(expectedAny).toBeTruthy(); + expect(expectedAny).toBeFalsy(); + expect(expectedAny).toHaveBeenCalled(); + expect(expectedAny).toHaveBeenCalledWith(paramsAny); + expect(expectedAny).toHaveBeenCalledTimes(expectedNumber); + expect(expectedAny).toHaveBeenCalledTimes(expectedPromiseNumber); + expect(expectedAny).toContain(expectationFailOutputAny); + expect(expectedNumber).toBeLessThan(expectedNumber); + expect(expectedNumber).toBeLessThan(expectedPromiseNumber); + expect(expectedNumber).toBeLessThanOrEqual(expectedNumber); + expect(expectedNumber).toBeLessThanOrEqual(expectedPromiseNumber); + expect(expectedNumber).toBeGreaterThan(expectedNumber); + expect(expectedNumber).toBeGreaterThan(expectedPromiseNumber); + expect(expectedNumber).toBeGreaterThanOrEqual(expectedNumber); + expect(expectedNumber).toBeGreaterThanOrEqual(expectedPromiseNumber); + expect(expectedNumber).toBeCloseTo(expectedNumber, expectedNumber); + expect(expectedPromiseNumber).toBeCloseTo(expectationFailOutputAny, expectedNumber); + expect(expectedAny).toThrow(expectationFailOutputAny); + expect(expectedAny).toThrowError(expectedString); + expect(expectedAny).toThrowError(expectedRegExp); + expect(expectedAny).toThrowError(expectedPromiseString); + expect(expectedAny).toThrowError(expectedPromiseRegExp); + expect(error).toThrowError(expectedString); + expect(error).toThrowError(expectedRegExp); + expect(error).toThrowError(expectedPromiseString); + expect(error).toThrowError(expectedPromiseRegExp); + expect(error).toThrowError(expectedString); + expect(errorPromise).toThrowError(expectedString); + expect(errorPromise).toThrowError(expectedRegExp); + expect(errorPromise).toThrowError(expectedPromiseString); + expect(errorPromise).toThrowError(expectedPromiseRegExp); + expect(errorPromise).toThrowError(expectedString); + }); + }); + + describe('jasmine matchers', () => { + it('should be able to add matchers', () => { + let matchers = { + toBeLotsMoreThan: function() { + return { + compare: function(actual: number, expected: number) { + return { + pass: actual > expected + 100 + }; + } + }; + }, + // Example custom matcher returning a promise that resolves to true/false. + toBeDisplayed: function() { + return { + compare: function(actual: any, expected: void) { + return { + pass: (actual.isDisplayed() as Promise) + }; + } + }; + } + }; + jasmine.addMatchers(matchers); + jasmine.getEnv().addMatchers(matchers); + jasmine.getEnv().currentSpec.addMatchers(matchers); + }); + }); +}); diff --git a/jasminewd2/tsconfig.json b/jasminewd2/tsconfig.json new file mode 100644 index 0000000000..81aa80fe8e --- /dev/null +++ b/jasminewd2/tsconfig.json @@ -0,0 +1,20 @@ +{ + "files": [ + "index.d.ts", + "jasminewd2-tests.ts" + ], + "compilerOptions": { + "module": "commonjs", + "lib": [ "es6" ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} diff --git a/jasminewd2/tslint.json b/jasminewd2/tslint.json new file mode 100644 index 0000000000..9ca86427bd --- /dev/null +++ b/jasminewd2/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "callable-types": false + } +} From 4a2ed872c1f2228bc8d76b4007fe42484c500031 Mon Sep 17 00:00:00 2001 From: YYC <395976266@qq.com> Date: Tue, 24 Jan 2017 07:45:49 +0800 Subject: [PATCH 09/54] fix: cannon add version (#14201) * fix: cannon add version * fix: fix version --- cannon/index.d.ts | 2 +- wonder-commonlib/index.d.ts | 2 +- wonder-frp/index.d.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cannon/index.d.ts b/cannon/index.d.ts index 6551e07b32..45e005d53d 100644 --- a/cannon/index.d.ts +++ b/cannon/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for cannon +// Type definitions for cannon 0.1 // Project: https://github.com/clark-stevenson/cannon.d.ts // Definitions by: Clark Stevenson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/wonder-commonlib/index.d.ts b/wonder-commonlib/index.d.ts index 3421de0125..464b6ada4e 100644 --- a/wonder-commonlib/index.d.ts +++ b/wonder-commonlib/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for wonder-commonlib v0.1.0 +// Type definitions for wonder-commonlib 0.1 // Project: https://github.com/yyc-git/Wonder-CommonLib // Definitions by: YYC // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/wonder-frp/index.d.ts b/wonder-frp/index.d.ts index c5e69d2dd9..c7459d6690 100644 --- a/wonder-frp/index.d.ts +++ b/wonder-frp/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for wonder-frp v0.1.0 +// Type definitions for wonder-frp 0.1 // Project: https://github.com/yyc-git/Wonder-FRP // Definitions by: YYC // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 1001a8eae92aff3d95aee7082459a36a51f2ca45 Mon Sep 17 00:00:00 2001 From: Justin Bay Date: Mon, 23 Jan 2017 19:33:00 -0500 Subject: [PATCH 10/54] Revert 80e4d8b/#11612. Fixes #14176 --- react/index.d.ts | 1 - react/test/index.ts | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/react/index.d.ts b/react/index.d.ts index a840e4b64d..4a19ec723c 100644 --- a/react/index.d.ts +++ b/react/index.d.ts @@ -165,7 +165,6 @@ declare namespace React { // Base component for plain JS classes class Component implements ComponentLifecycle { constructor(props?: P, context?: any); - constructor(...args: any[]); setState(f: (prevState: S, props: P) => Pick, callback?: () => any): void; setState(state: Pick, callback?: () => any): void; forceUpdate(callBack?: () => any): void; diff --git a/react/test/index.ts b/react/test/index.ts index 0900926cf6..b575055514 100644 --- a/react/test/index.ts +++ b/react/test/index.ts @@ -659,20 +659,6 @@ React.createFactory(TransitionGroup)({ component: "div" }); let newObjShallow = update(obj, { $merge: { b: 6, c: 7 } }); // => {a: 5, b: 6, c: 7} } -// -// React Component classes super spread arguments -// -------------------------------------------------------------------------- -class ConstructorSpreadArgsComponent extends React.Component<{}, {}> { - constructor(...args: any[]) { - super(...args); - } -} -class ConstructorSpreadArgsPureComponent extends React.PureComponent<{}, {}> { - constructor(...args: any[]) { - super(...args); - } -} - // // The SyntheticEvent.target.value should be accessible for onChange // -------------------------------------------------------------------------- From 99d41f818c2de87790ce1f02956cbc39bce40f40 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 23 Jan 2017 17:22:52 -0800 Subject: [PATCH 11/54] Add UMD namespace declaration to 'roslib'. (#14203) --- roslib/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/roslib/index.d.ts b/roslib/index.d.ts index fbb6deff6e..c195387901 100644 --- a/roslib/index.d.ts +++ b/roslib/index.d.ts @@ -11,6 +11,7 @@ ---------------------------------- */ export = ROSLIB; +export as namespace ROSLIB; declare namespace ROSLIB { export class Ros { From 24c9f897f0f17c9cdcdf11184a25c33ee94aac3a Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Mon, 23 Jan 2017 22:08:03 -0500 Subject: [PATCH 12/54] Fix react-router-redux v3 --- react-router-redux/v3/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/react-router-redux/v3/index.d.ts b/react-router-redux/v3/index.d.ts index 83c9313e1e..e0b3a62698 100644 --- a/react-router-redux/v3/index.d.ts +++ b/react-router-redux/v3/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/rackt/react-router-redux // Definitions by: Isman Usoh , Noah Shipley , Dimitri Rosenberg // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import * as Redux from "redux"; import * as History from "history"; From 12b8c9de5fd892dff77280988b7d40c542675b4f Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Mon, 23 Jan 2017 22:17:24 -0500 Subject: [PATCH 13/54] Try adding a package for redux --- react-router-redux/v3/package.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 react-router-redux/v3/package.json diff --git a/react-router-redux/v3/package.json b/react-router-redux/v3/package.json new file mode 100644 index 0000000000..36ce503807 --- /dev/null +++ b/react-router-redux/v3/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "redux": "^3.6.0" + } +} From 7e3ebd00f0ece65fc556713c5fad39c7253d7a90 Mon Sep 17 00:00:00 2001 From: Blake Embrey Date: Mon, 23 Jan 2017 19:58:07 -0800 Subject: [PATCH 14/54] raw-body: conditional return type based on options --- raw-body/index.d.ts | 21 ++++++++++++--------- raw-body/raw-body-tests.ts | 6 +++--- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/raw-body/index.d.ts b/raw-body/index.d.ts index a99f2c51c2..94131c5764 100644 --- a/raw-body/index.d.ts +++ b/raw-body/index.d.ts @@ -4,13 +4,16 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// + import { Readable } from "stream"; declare namespace getRawBody { + export type Encoding = string | true; + export interface Options { length?: number; limit?: number; - encoding?: string; + encoding?: Encoding; } export interface RawBodyError extends Error { @@ -19,18 +22,18 @@ declare namespace getRawBody { expected?: number; received?: number; encoding?: string; - status?: number; - statusCode?: number; - type?: string; + status: number; + statusCode: number; + type: string; } - - export type Callback = (err: RawBodyError, res: string | Buffer) => void; } -declare function getRawBody(stream: Readable, callback: getRawBody.Callback): void; -declare function getRawBody(stream: Readable, options: getRawBody.Options | string, callback: getRawBody.Callback): void; +declare function getRawBody(stream: Readable, callback: (err: getRawBody.RawBodyError, body: Buffer) => void): void; +declare function getRawBody(stream: Readable, options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding, callback: (err: getRawBody.RawBodyError, body: string) => void): void; +declare function getRawBody(stream: Readable, options: getRawBody.Options, callback: (err: getRawBody.RawBodyError, body: Buffer) => void): void; -declare function getRawBody(stream: Readable, options?: getRawBody.Options | string): Promise; +declare function getRawBody(stream: Readable, options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding): Promise; +declare function getRawBody(stream: Readable, options?: getRawBody.Options): Promise; export = getRawBody; diff --git a/raw-body/raw-body-tests.ts b/raw-body/raw-body-tests.ts index f23160c876..ad6065537d 100644 --- a/raw-body/raw-body-tests.ts +++ b/raw-body/raw-body-tests.ts @@ -2,11 +2,11 @@ import getRawBody = require("raw-body"); const stream: any = {}; -const simple = getRawBody(stream); +const simple: Promise = getRawBody(stream); -const withEncoding = getRawBody(stream, "utf-8"); +const withEncoding: Promise = getRawBody(stream, "utf-8"); -const withOptions = getRawBody(stream, { +const withOptions: Promise = getRawBody(stream, { encoding: "utf-8", length: 1024, limit: 512 From 928c0be342b96390221e1cc69d8c85031f945704 Mon Sep 17 00:00:00 2001 From: Fredrik Nicol Date: Sat, 21 Jan 2017 11:58:33 +0100 Subject: [PATCH 15/54] Add constructor arguments in `ClassType` --- react/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/react/index.d.ts b/react/index.d.ts index a840e4b64d..bfc41b609a 100644 --- a/react/index.d.ts +++ b/react/index.d.ts @@ -230,8 +230,8 @@ declare namespace React { */ type ClassType, C extends ComponentClass

> = C & - (new () => T) & - (new () => { props: P }); + (new (props?: P, context?: any) => T) & + (new (props?: P, context?: any) => { props: P }); // // Component Specs and Lifecycle From 0e50ed4cc33b26a7f3396cd61ed6e6d4ad9206ec Mon Sep 17 00:00:00 2001 From: Takenaka Simon Date: Tue, 24 Jan 2017 20:13:02 +0900 Subject: [PATCH 16/54] [storejs] Add forEach to type defintion --- storejs/index.d.ts | 3 ++- storejs/storejs-tests.ts | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/storejs/index.d.ts b/storejs/index.d.ts index ad5d8e979c..0068d94722 100644 --- a/storejs/index.d.ts +++ b/storejs/index.d.ts @@ -16,10 +16,11 @@ interface StoreJSStatic { getAll(): any; serialize(value: any): string; deserialize(value: string): any; + forEach(command: (key: string, value: any) => void): void; } declare var store: StoreJSStatic; declare module 'store' { - export = store; + export = store; } diff --git a/storejs/storejs-tests.ts b/storejs/storejs-tests.ts index 19e0ae898b..13c937c3c9 100644 --- a/storejs/storejs-tests.ts +++ b/storejs/storejs-tests.ts @@ -5,7 +5,7 @@ import * as store from 'store'; store.set('username', 'marcus'); // Get 'username' -var userName:any = store.get('username'); +var userName: any = store.get('username'); var all: Object = store.getAll(); @@ -22,3 +22,10 @@ store.set('user', { name: 'marcus', likes: 'javascript' }); var user: any = store.get('user'); alert(user.name + ' likes ' + user.likes); +// Get all stored values +store.getAll().user.name; + +// Loop over all stored values +store.forEach(function(key, val) { + console.log(key, '==', val); +}); From 35c3b91e095b7a5aa4cfd6d51e9bfbbda3b5a3b6 Mon Sep 17 00:00:00 2001 From: a8775 Date: Tue, 24 Jan 2017 14:48:02 +0100 Subject: [PATCH 17/54] detailing declaration for dgram socket.close () --- node/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/index.d.ts b/node/index.d.ts index 6e4fbce84e..93c0d7c709 100644 --- a/node/index.d.ts +++ b/node/index.d.ts @@ -2124,7 +2124,7 @@ declare module "dgram" { send(msg: Buffer | String | any[], offset: number, length: number, port: number, address: string, callback?: (error: Error, bytes: number) => void): void; bind(port?: number, address?: string, callback?: () => void): void; bind(options: BindOptions, callback?: Function): void; - close(callback?: any): void; + close(callback?: () => void): void; address(): AddressInfo; setBroadcast(flag: boolean): void; setTTL(ttl: number): void; From f0cbff79a4ed0b58d50b5a6475726cf02d2cc6a7 Mon Sep 17 00:00:00 2001 From: Peter Keuter Date: Tue, 24 Jan 2017 15:17:08 +0100 Subject: [PATCH 18/54] importDocument declaration --- xmlbuilder/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/xmlbuilder/index.d.ts b/xmlbuilder/index.d.ts index 4367a7fb10..20dabf97ca 100644 --- a/xmlbuilder/index.d.ts +++ b/xmlbuilder/index.d.ts @@ -62,6 +62,7 @@ declare class XMLElementOrXMLNode { declaration(version: string, encoding: string, standalone: boolean): XMLElementOrXMLNode; doctype(pubID: string, sysID: string): XMLDocType; up(): XMLElementOrXMLNode; + importDocument(input: XMLElementOrXMLNode): XMLElementOrXMLNode; root(): XMLElementOrXMLNode; document(): any; end(options?: Object): string; From 940a72926dd0b003374e1deb425652aa8e04744c Mon Sep 17 00:00:00 2001 From: Sebastian Sebald Date: Tue, 24 Jan 2017 16:50:07 +0100 Subject: [PATCH 19/54] redux-immutable: improve typings Current available typings for `redux-immutable` do only allow to have a `Reducer` and allow to be pass an arbitrary object to `combineReducers`. This patch updates the typings and brings them in-sync with the official `redux` typings. --- redux-immutable/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redux-immutable/index.d.ts b/redux-immutable/index.d.ts index 2c378f02d8..386a3a1613 100644 --- a/redux-immutable/index.d.ts +++ b/redux-immutable/index.d.ts @@ -1,8 +1,8 @@ -// Type definitions for redux-immutable v3.0.5 +// Type definitions for redux-immutable v3.0.10 // Project: https://github.com/gajus/redux-immutable -// Definitions by: Pedro Pereira +// Definitions by: Sebastian Sebald // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as Redux from 'redux'; -export declare function combineReducers(reducers: Object): Redux.Reducer; +export declare function combineReducers(reducers: Redux.ReducersMapObject): Redux.Reducer; From e22fc912b9109557b2878001055b66a52374d1c0 Mon Sep 17 00:00:00 2001 From: Joshua Sheard Date: Tue, 24 Jan 2017 18:15:13 +0000 Subject: [PATCH 20/54] Fix typo in TrianglesDrawModes enum --- three/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/three/index.d.ts b/three/index.d.ts index 3b0917f577..36263993c7 100644 --- a/three/index.d.ts +++ b/three/index.d.ts @@ -217,7 +217,7 @@ declare namespace THREE { // Triangle Draw modes export enum TrianglesDrawModes { } - export const TrianglesDrawModesMode: TrianglesDrawModes; + export const TrianglesDrawMode: TrianglesDrawModes; export const TriangleStripDrawMode: TrianglesDrawModes; export const TriangleFanDrawMode: TrianglesDrawModes; From 8d5006eaf0676765863624e059884e1ac066c5a4 Mon Sep 17 00:00:00 2001 From: Sebastian Sebald Date: Tue, 24 Jan 2017 20:20:56 +0100 Subject: [PATCH 21/54] Use original author --- redux-immutable/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redux-immutable/index.d.ts b/redux-immutable/index.d.ts index 386a3a1613..c8b2276c22 100644 --- a/redux-immutable/index.d.ts +++ b/redux-immutable/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for redux-immutable v3.0.10 // Project: https://github.com/gajus/redux-immutable -// Definitions by: Sebastian Sebald +// Definitions by: Pedro Pereira // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as Redux from 'redux'; From 386cc89aa9abc7775600e80096e22787253d82ef Mon Sep 17 00:00:00 2001 From: Sebastian Sebald Date: Tue, 24 Jan 2017 22:34:26 +0100 Subject: [PATCH 22/54] Add myself as author --- redux-immutable/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redux-immutable/index.d.ts b/redux-immutable/index.d.ts index c8b2276c22..483de7c9bf 100644 --- a/redux-immutable/index.d.ts +++ b/redux-immutable/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for redux-immutable v3.0.10 // Project: https://github.com/gajus/redux-immutable -// Definitions by: Pedro Pereira +// Definitions by: Pedro Pereira , Sebastian Sebald // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as Redux from 'redux'; From 1989ed4c5a8f0cfea032a30220afb81dab98ca88 Mon Sep 17 00:00:00 2001 From: Simon Ramsay Date: Tue, 24 Jan 2017 16:33:36 -0500 Subject: [PATCH 23/54] added additional typing for assigning result of dot-object conversion - bumped version number --- dot-object/dot-object-tests.ts | 23 ++++++++++++++--------- dot-object/index.d.ts | 25 ++++++++++++++++--------- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/dot-object/dot-object-tests.ts b/dot-object/dot-object-tests.ts index 603a66c57e..a553c6c68d 100644 --- a/dot-object/dot-object-tests.ts +++ b/dot-object/dot-object-tests.ts @@ -16,10 +16,10 @@ var src = { } }; -var tgt = {name: 'Brandon'}; +var tgt = { name: 'Brandon' }; dot.copy('stuff.phone', 'wanna.haves.phone', src, tgt, [(arg: any) => { - return arg; + return arg; }]); dot.transfer('stuff.phone', 'wanna.haves.phone', src, tgt); @@ -37,17 +37,17 @@ var row = { }; dot.object(row, (arg: any) => { - return arg; + return arg; }); dot.str('this.is.my.string', 'value', tgt); var newObj = { - some: { - nested: { - value: 'Hi there!' - } - } + some: { + nested: { + value: 'Hi there!' + } + } }; var val = dot.pick('some.nested.value', newObj); @@ -62,4 +62,9 @@ val = dot.remove('some.nested.value', newObj); // or use the alias `del` val = dot.del('some.nested.value', newObj); -var dotWithArrow = new dot('=>'); \ No newline at end of file +// convert object to dot object +var result = {}; +dot.dot({ test: 'something' }, result); +result = dot.dot({ test: 'something' }); + +var dotWithArrow = new dot('=>'); diff --git a/dot-object/index.d.ts b/dot-object/index.d.ts index 953291c631..176e1c0daf 100644 --- a/dot-object/index.d.ts +++ b/dot-object/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Dot-Object v1.4.1 +// Type definitions for Dot-Object v1.4.2 // Project: https://github.com/rhalff/dot-object // Definitions by: Niko Kovačič // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -6,14 +6,14 @@ declare namespace DotObject { interface DotConstructor extends Dot { - new(separator: string): Dot; + new (separator: string): Dot; } interface ModifierFunctionWrapper { (arg: any): any; } - interface Dot { + interface Dot { /** * * Copy a property from one object to another object. @@ -34,11 +34,6 @@ declare namespace DotObject { * Convert object to dotted-key/value pair * * Usage: - * - * var tgt = dot.dot(obj) - * - * or - * * var tgt = {} * dot.dot(obj, tgt) * @@ -46,6 +41,18 @@ declare namespace DotObject { * @param {Object} tgt target object */ dot(obj: any, tgt: any): void + /** + * + * Convert object to dotted-key/value pair + * + * Usage: + * + * var tgt = dot.dot(obj) + * @param {Object} obj source object + * @return {Object} result + */ + dot(obj: any): any + /** * * Remove value from an object using dot notation. @@ -166,4 +173,4 @@ declare var dot: DotObject.DotConstructor; declare module 'dot-object' { export = dot; -} \ No newline at end of file +} From c960430ff9a47bb94ef53ad79fbb759343ea3abb Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Tue, 24 Jan 2017 13:43:22 -0800 Subject: [PATCH 24/54] Fix typo in webpack PerformanceOptions s/maxEntryPointSize/maxEntrypointSize --- webpack/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack/index.d.ts b/webpack/index.d.ts index 73f575c973..a557034131 100644 --- a/webpack/index.d.ts +++ b/webpack/index.d.ts @@ -1146,7 +1146,7 @@ declare namespace webpack { /** * An entrypoint represents all assets that would be utilized during initial load time for a specific entry. This option controls when webpack should emit performance hints based on the maximum entrypoint size. The default value is 250000 (bytes). */ - maxEntryPointSize?: number; + maxEntrypointSize?: number; /** * An asset is any emitted file from webpack. This option controls when webpack emits a performance hint based on individual asset size. The default value is 250000 (bytes). */ From a70e784fec04cf50367ebcd11d88c67a66058614 Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Tue, 24 Jan 2017 14:59:01 -0800 Subject: [PATCH 25/54] fix test --- webpack/webpack-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack/webpack-tests.ts b/webpack/webpack-tests.ts index 8af08751ed..7c1f109a2d 100644 --- a/webpack/webpack-tests.ts +++ b/webpack/webpack-tests.ts @@ -544,7 +544,7 @@ const resolve: webpack.Resolve = { const performance: webpack.PerformanceOptions = { hints: 'error', - maxEntryPointSize: 400000, + maxEntrypointSize: 400000, maxAssetSize: 100000, assetFilter: function(assetFilename) { return assetFilename.endsWith('.js'); From ae3b2e73d3045104dc0ba279f2363ec7746dce00 Mon Sep 17 00:00:00 2001 From: Homa Wong Date: Tue, 24 Jan 2017 16:29:09 -0800 Subject: [PATCH 26/54] Update index.d.ts --- redux-logger/index.d.ts | 78 ++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/redux-logger/index.d.ts b/redux-logger/index.d.ts index edcb2b9152..2c02273d60 100644 --- a/redux-logger/index.d.ts +++ b/redux-logger/index.d.ts @@ -5,46 +5,46 @@ import * as Redux from "redux"; -type LoggerPredicate = (getState: () => any, action: any) => boolean; - -type StateToString = (state: any) => string; -type ActionToString = (action: any) => string; -type ErrorToString = (error: any, prevState: any) => string; - -interface ColorsObject { - title?: boolean | ActionToString; - prevState?: boolean | StateToString; - action?: boolean | ActionToString; - nextState?: boolean | StateToString; - error?: boolean | ErrorToString; -} - -interface LevelObject { - prevState?: string | boolean | StateToString; - action?: string | boolean | ActionToString; - nextState?: string | boolean | StateToString; - error?: string | boolean | ErrorToString; -} - -interface ReduxLoggerOptions { - level?: string | ActionToString | LevelObject; - duration?: boolean; - timestamp?: boolean; - colors?: ColorsObject; - logger?: any; - logErrors?: boolean; - collapsed?: boolean | LoggerPredicate; - predicate?: LoggerPredicate; - stateTransformer?: (state: any) => any; - actionTransformer?: (action: any) => any; - errorTransformer?: (error: any) => any; - diff?: boolean; - diffPredicate?: LoggerPredicate; -} - // Trickery to get TypeScript to accept that our anonymous, non-default export is a function. // see https://github.com/Microsoft/TypeScript/issues/3612 for more -declare namespace createLogger { } -declare function createLogger(options?: ReduxLoggerOptions): Redux.Middleware; +declare namespace createLogger { + export type LoggerPredicate = (getState: () => any, action: any) => boolean; + + export type StateToString = (state: any) => string; + export type ActionToString = (action: any) => string; + export type ErrorToString = (error: any, prevState: any) => string; + + export interface ColorsObject { + title?: boolean | ActionToString; + prevState?: boolean | StateToString; + action?: boolean | ActionToString; + nextState?: boolean | StateToString; + error?: boolean | ErrorToString; + } + + export interface LevelObject { + prevState?: string | boolean | StateToString; + action?: string | boolean | ActionToString; + nextState?: string | boolean | StateToString; + error?: string | boolean | ErrorToString; + } + + export interface ReduxLoggerOptions { + level?: string | ActionToString | LevelObject; + duration?: boolean; + timestamp?: boolean; + colors?: ColorsObject; + logger?: any; + logErrors?: boolean; + collapsed?: boolean | LoggerPredicate; + predicate?: LoggerPredicate; + stateTransformer?: (state: any) => any; + actionTransformer?: (action: any) => any; + errorTransformer?: (error: any) => any; + diff?: boolean; + diffPredicate?: LoggerPredicate; + } +} +declare function createLogger(options?: createLogger.ReduxLoggerOptions): Redux.Middleware; export = createLogger; From afa6e180c8cd8ab091b4f38a885df70633e937ba Mon Sep 17 00:00:00 2001 From: Homa Wong Date: Tue, 24 Jan 2017 16:35:38 -0800 Subject: [PATCH 27/54] Update index.d.ts --- redux-logger/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/redux-logger/index.d.ts b/redux-logger/index.d.ts index 2c02273d60..257f070d44 100644 --- a/redux-logger/index.d.ts +++ b/redux-logger/index.d.ts @@ -5,7 +5,6 @@ import * as Redux from "redux"; - // Trickery to get TypeScript to accept that our anonymous, non-default export is a function. // see https://github.com/Microsoft/TypeScript/issues/3612 for more declare namespace createLogger { From 95bd599bc879a80a389b3f43fd132737a004ce72 Mon Sep 17 00:00:00 2001 From: Alvaro Dias Date: Tue, 24 Jan 2017 20:47:04 -0800 Subject: [PATCH 28/54] documentdb: Add typings for user-defined functions --- documentdb/documentdb-tests.ts | 25 +++++++++++++++++++++++++ documentdb/index.d.ts | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/documentdb/documentdb-tests.ts b/documentdb/documentdb-tests.ts index 34d6b5236b..f4a06d3fb7 100644 --- a/documentdb/documentdb-tests.ts +++ b/documentdb/documentdb-tests.ts @@ -55,6 +55,31 @@ docDBClient.createStoredProcedure('collection', procedure, undefined, (error, re } }); +var userDefinedFunction: docDB.UserDefinedFunction = { + id: 'udf1', + body: function () { + console.log('foo'); + } +}; + +docDBClient.createUserDefinedFunction('collection', userDefinedFunction, undefined, (error, result) => { + if (error) { + throw new Error(error.body); + } + else { + console.log('Created function: ' + result.id); + } +}); + +docDBClient.queryUserDefinedFunctions('collection', "SELECT * FROM root", undefined).toArray((error, results) => { + if (error) { + throw new Error(error.body); + } + else { + console.log('Number of functions in collection: ' + results.length); + } +}); + var trigger: docDB.Trigger = { id: 'trigger-one', body: function () { diff --git a/documentdb/index.d.ts b/documentdb/index.d.ts index 406affe2c8..048825b492 100644 --- a/documentdb/index.d.ts +++ b/documentdb/index.d.ts @@ -154,6 +154,10 @@ interface ProcedureMeta extends AbstractMeta { body: string; } +/** Represents the meta data for a user-defined function. */ +interface UserDefinedFunctionMeta extends AbstractMeta { +} + /** Represents the meta data for a trigger. */ interface TriggerMeta extends AbstractMeta { body: string; @@ -181,6 +185,13 @@ export interface Procedure extends UniqueId { body(...params: any[]): void; } +/** Represents a DocumentDB user-defined function. */ +export interface UserDefinedFunction extends UniqueId { + + /** The function representing the user-defined function. */ + body(...params: any[]): void; +} + /** Represents a DocumentDB trigger. */ export interface Trigger extends UniqueId { /** The type of the trigger. Should be either 'pre' or 'post'. */ @@ -290,6 +301,19 @@ export declare class DocumentClient { */ public createStoredProcedure(collectionLink: string, procedure: Procedure, options: RequestOptions, callback: RequestCallback): void; + /** + * Create a UserDefinedFunction. + *

+ * DocumentDB supports JavaScript UDFs which can be used inside queries, stored procedures and triggers.
+ * For additional details, refer to the server-side JavaScript API documentation. + *

+ * @param collectionLink - The self-link of the collection. + * @param udf - Represents the body of the userDefinedFunction. + * @param [options] - The request options. + * @param callback - The callback for the request. + */ + public createUserDefinedFunction(collectionLink: string, udf: UserDefinedFunction, options: RequestOptions, callback: RequestCallback): void; + /** * Create a trigger. *

@@ -349,6 +373,15 @@ export declare class DocumentClient { */ public queryStoredProcedures(collectionLink: string, query: string | SqlQuerySpec): QueryIterator; + /** + * Query the user-defined functions for the collection. + * @param collectionLink - The self-link of the collection. + * @param query - A SQL query string. + * @param [options] - Represents the feed options. + * @returns - An instance of queryIterator to handle reading feed. + */ + public queryUserDefinedFunctions(collectionLink: string, query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; + /** * Query the documents for the collection. * @param collectionLink - The self-link of the collection. From 1221959579dc6d1795b05241f291d640751ad3ab Mon Sep 17 00:00:00 2001 From: James Milner Date: Wed, 25 Jan 2017 11:32:22 +0000 Subject: [PATCH 29/54] Adds clickable to marker options Adds clickable to marker options; this is currently omitted for one reason or another --- leaflet/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/leaflet/index.d.ts b/leaflet/index.d.ts index c031df81bc..4112082f54 100644 --- a/leaflet/index.d.ts +++ b/leaflet/index.d.ts @@ -1397,6 +1397,7 @@ declare namespace L { export interface MarkerOptions extends InteractiveLayerOptions { icon?: Icon; + clickable?: boolean; draggable?: boolean; keyboard?: boolean; title?: string; From 1f8049b7c0bfd44f7306842f554711fb99e0dc16 Mon Sep 17 00:00:00 2001 From: Adam Bennett Date: Wed, 25 Jan 2017 11:27:22 -0600 Subject: [PATCH 30/54] Correcting Request.id from number to string --- hapi/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hapi/index.d.ts b/hapi/index.d.ts index b98e1cdf25..7c12b19034 100644 --- a/hapi/index.d.ts +++ b/hapi/index.d.ts @@ -1206,7 +1206,7 @@ export class Request extends Events.EventEmitter { /** the raw request headers (references request.raw.headers).*/ headers: IDictionary; /** a unique request identifier (using the format '{now}:{connection.info.id}:{5 digits counter}').*/ - id: number; + id: string; /** request information */ info: { /** the request preferred encoding. */ From b2f92ad96759e0e9aa7fa6ff2c158362c0686cc0 Mon Sep 17 00:00:00 2001 From: Jeff Kenney Date: Wed, 25 Jan 2017 09:42:31 -0800 Subject: [PATCH 31/54] knex: reference correct Promise implementation --- knex/index.d.ts | 1 + knex/knex-tests.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/knex/index.d.ts b/knex/index.d.ts index 55ef48a05e..910bab9d04 100644 --- a/knex/index.d.ts +++ b/knex/index.d.ts @@ -7,6 +7,7 @@ /// import * as events from "events"; +import * as Promise from "bluebird"; type Callback = Function; type Client = Function; diff --git a/knex/knex-tests.ts b/knex/knex-tests.ts index 8fd9cc971c..8c1878760b 100644 --- a/knex/knex-tests.ts +++ b/knex/knex-tests.ts @@ -1,5 +1,6 @@ "use strict"; import * as Knex from 'knex'; +import * as Promise from 'bluebird'; import * as _ from 'lodash'; // Initializing the Library From 84553b93f1da0dbbe5678c50067688ce7e910967 Mon Sep 17 00:00:00 2001 From: Adam Bennett Date: Wed, 25 Jan 2017 11:55:40 -0600 Subject: [PATCH 32/54] Updating major version number of Hapi --- hapi/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hapi/index.d.ts b/hapi/index.d.ts index 7c12b19034..9d8f8f0120 100644 --- a/hapi/index.d.ts +++ b/hapi/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for hapi 13.0.0 +// Type definitions for hapi 16.0.0 // Project: http://github.com/spumko/hapi // Definitions by: Jason Swearingen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 792caa8eab5f55fdc088f88a32695b8c1a2b14ba Mon Sep 17 00:00:00 2001 From: Justin Simms Date: Wed, 25 Jan 2017 12:59:21 -0600 Subject: [PATCH 33/54] Add redux-saga to not needed packages. --- notNeededPackages.json | 8 +- redux-saga/index.d.ts | 141 ---------------------- redux-saga/package.json | 5 - redux-saga/redux-saga-tests.ts | 213 --------------------------------- redux-saga/tsconfig.json | 23 ---- 5 files changed, 7 insertions(+), 383 deletions(-) delete mode 100644 redux-saga/index.d.ts delete mode 100644 redux-saga/package.json delete mode 100644 redux-saga/redux-saga-tests.ts delete mode 100644 redux-saga/tsconfig.json diff --git a/notNeededPackages.json b/notNeededPackages.json index 482436bc9e..e671ef4523 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -287,6 +287,12 @@ "typingsPackageName": "ecmarkup", "sourceRepoURL": "https://github.com/bterlson/ecmarkup", "asOfVersion": "3.4.0" + }, + { + "libraryName": "redux-saga", + "typingsPackageName": "redux-saga", + "sourceRepoURL": "https://github.com/redux-saga/redux-saga", + "asOfVersion": "0.10.5" } ] -} \ No newline at end of file +} diff --git a/redux-saga/index.d.ts b/redux-saga/index.d.ts deleted file mode 100644 index 0319c8b44b..0000000000 --- a/redux-saga/index.d.ts +++ /dev/null @@ -1,141 +0,0 @@ -// Type definitions for redux-saga 0.9.1 -// Project: https://github.com/yelouafi/redux-saga -// Definitions by: Daniel Lytkin , Dimitri Rosenberg -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare module 'redux-saga' { - export class SagaCancellationException { - } - - export type Saga = (getState?: () => T) => Iterable; - export type Predicate = (action: any) => boolean; - export type Pattern = string | string[] | Predicate; - - import {Middleware} from 'redux'; - - interface SagaMiddleware extends Middleware { - run(saga: Saga, ...args: any[]): void; - } - - export default function (...sagas: Saga[]): SagaMiddleware; - - export { - CANCEL, - RACE_AUTO_CANCEL, - PARALLEL_AUTO_CANCEL, - MANUAL_CANCEL - } from 'redux-saga/lib/proc'; - - import * as monitorActions from 'redux-saga/lib/monitorActions'; - export {monitorActions} - - export {runSaga, storeIO} from 'redux-saga/lib/runSaga' - - export interface Task { - name:string; - isRunning():boolean; - result():T; - error():any; - cancel(): void; - } - - export function takeEvery(pattern: Pattern, saga: Saga, ...args: any[]): { [Symbol.iterator](): IterableIterator }; - - export function takeLatest(pattern: Pattern, saga: Saga, ...args: any[]): { [Symbol.iterator](): IterableIterator }; - - export function delay(ms: number): Promise; - - export function delay(ms: number, val: T): Promise; - - export function isCancelError(e: any): boolean; -} - -declare module 'redux-saga/effects' { - import {Task} from 'redux-saga'; - import {Predicate} from 'redux-saga'; - import {Pattern} from 'redux-saga'; - - export type Effect = {}; - - type EffectFunction = (arg1?: T1, arg2?: T2, arg3?: T3, ...rest: any[]) => Promise | Iterable; - - interface EffectFunctionContext { - 0: any; - 1: EffectFunction; - } - - export function take(pattern?: Pattern): Effect; - - export function put(action: any): Effect; - - export function race(effects: {[key:string]: any}): Effect; - - export function call(fn: EffectFunction, arg1?: T1, arg2?: T2, arg3?: T3, ...rest: any[]): Effect; - - export function call(fn: EffectFunctionContext, arg1?: T1, arg2?: T2, arg3?: T3, ...rest: any[]): Effect; - - export function apply(context: any, fn: EffectFunction, arg1?: T1, arg2?: T2, arg3?: T3, ...rest: any[]): Effect; - - export function fork(effect: Effect): Effect; - - export function fork(fn: EffectFunction, arg1?: T1, arg2?: T2, arg3?: T3, ...rest: any[]): Effect; - - export function fork(fn: EffectFunctionContext, arg1?: T1, arg2?: T2, arg3?: T3, ...rest: any[]): Effect; - - export function join(task: Task): Effect; - - export function select(selector?: (state: any, ...args: any[]) => any, ...args: any[]): Effect; - - export function cancel(task: Task): Effect; -} - -declare module 'redux-saga/lib/proc' { - import {Task} from 'redux-saga'; - - export const CANCEL: symbol; - export const NOT_ITERATOR_ERROR: string; - export const PARALLEL_AUTO_CANCEL: string; - export const RACE_AUTO_CANCEL: string; - export const MANUAL_CANCEL: string; - - export default function proc(iterator: Iterable, - subscribe?: (cb: Function) => Function, - dispatch?: (action: any) => any, - monitor?: (action: any) => void, - parentEffectId?: any, - name?: string): Task; -} - - -declare module 'redux-saga/lib/runSaga' { - import {Store} from 'redux'; - import {Task} from 'redux-saga'; - - interface IO { - dispatch: (action: any) => any; - subscribe: (cb: Function) => Function; - } - - export function storeIO(store: Store): IO; - - export function runSaga(iterator: Iterable, - io: IO, - monitor?: (action: any) => void): Task; -} - - -declare module 'redux-saga/lib/emitter' { - export default function emitter(): { - subscribe(cb: Function):Function; - emit(item: any):void; - } -} - -declare module 'redux-saga/lib/monitorActions' { - export const MONITOR_ACTION: string; - export const EFFECT_TRIGGERED: string; - export const EFFECT_RESOLVED: string; - export const EFFECT_REJECTED: string; -} diff --git a/redux-saga/package.json b/redux-saga/package.json deleted file mode 100644 index e52256ea90..0000000000 --- a/redux-saga/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "redux": "^3.6.0" - } -} \ No newline at end of file diff --git a/redux-saga/redux-saga-tests.ts b/redux-saga/redux-saga-tests.ts deleted file mode 100644 index 1165103186..0000000000 --- a/redux-saga/redux-saga-tests.ts +++ /dev/null @@ -1,213 +0,0 @@ - - - -import sagaMiddleware, { - storeIO, - runSaga, - Saga, - SagaCancellationException, - takeEvery, - takeLatest, - isCancelError -} from 'redux-saga' - -import { - take, - put, - race, - call, - apply, - fork, - select, - cancel, -} from 'redux-saga/effects' - -import {applyMiddleware, createStore} from 'redux'; - -declare const delay: (ms: number) => Promise; -declare const fetchApi: (url: string) => Promise; - -namespace GettingStarted { - - const incrementAsync:Saga = function* incrementAsync() { - - while(true) { - - // wait for each INCREMENT_ASYNC action - const nextAction = yield take('INCREMENT_ASYNC') - - // delay is a sample function - // return a Promise that resolves after (ms) milliseconds - yield delay(1000) - - // dispatch INCREMENT_COUNTER - yield put( {type: 'INCREMENT_COUNTER'} ) - } - - } - - const createStoreWithSaga = applyMiddleware( - // ..., - sagaMiddleware(incrementAsync) - )(createStore) - - export default function configureStore(initialState) { - return createStoreWithSaga((state: any) => state, initialState) - } -} - -namespace EffectCombinators { - const fetchPostsWithTimeout:Saga = function* fetchPostsWithTimeout() { - while( yield take('FETCH_POSTS') ) { - // starts a race between 2 effects - const {posts, timeout} = yield race({ - posts : call([this, fetchApi], '/posts'), - timeout : call(delay, 1000) - }) - - if(posts) - put( {type: 'RECEIVE_POSTS', posts} ) - else - put( {type: 'TIMEOUT_ERROR'} ) - } - } -} - - -namespace SequencingSagasViaYield { - function showScore(score) { - return { - type: 'SHOW_SCORE', score - } - } - - function* playLevelOne(getState) { yield 1 } - - function* playLevelTwo(getState) { yield 2 } - - function* playLevelThree(getState) { yield 3 } - - const game: Saga = function* game(getState) { - - const score1 = yield* playLevelOne(getState) - yield put(showScore(score1)) - - const score2 = yield* playLevelTwo(getState) - yield put(showScore(score2)) - - const score3 = yield* playLevelThree(getState) - yield put(showScore(score3)) - - } -} - - -namespace ComposingSagas { - function* fetchProducts() { - yield put( {type: 'REQUEST_PRODUCTS'} ) - const products = yield call(fetchApi, '/products') - yield put( {type: 'RECEIVE_PRODUCTS', products } ) - } - - function* watchFetch() { - while ( yield take('FETCH_PRODUCTS') ) { - yield call(fetchProducts) // waits for the fetchProducts task to - // terminate - } - } -} - - -namespace NonBlockingCallsWithForkJoin { - function* fetchPosts() { - yield put( {type: 'REQUEST_POSTS'} ) - const posts = yield call(fetchApi, '/posts') - yield put( {type: 'RECEIVE_POSTS', posts} ) - } - - function* watchFetch() { - while ( yield take('FETCH_POSTS') ) { - yield fork(fetchPosts) // non blocking call - } - } -} - - -namespace TaskCancellation { - declare const someApi: () => any; - - function* bgSync() { - try { - while(true) { - yield put({type: 'REQUEST_START'}) - const result = yield apply(this, someApi) - yield put({type: 'REQUEST_SUCCESS', result}) - yield call(delay, 5000) - } - } catch(error) { - if(error instanceof SagaCancellationException && isCancelError(error)) - yield put({type: 'REQUEST_FAILURE', message: 'Sync cancelled!'}) - } - } - - function* main() { - while( yield take('START_BACKGROUND_SYNC') ) { - // starts the task in the background - const bgSyncTask = yield fork(bgSync) - - // wait for the user stop action - yield take('STOP_BACKGROUND_SYNC') - // user clicked stop. cancel the background task - // this will throw a SagaCancellationException into the forked bgSync - // task - yield cancel(bgSyncTask) - } - } -} - - -namespace DynamicallyStartingSagasWithRunSaga { - const store = createStore((state: any, action: any) => state); - - function* serverSaga(getState) { - yield getState() - } - - runSaga( - serverSaga(store.getState), - storeIO(store) - ) -} - -namespace DynamicallyStartingSagasWithMiddleware { - function* startupSaga() { - } - - function* dynamicSaga() { - } - - sagaMiddleware(startupSaga).run(dynamicSaga) -} - -namespace TestHelpers { - function* watchAndLog(getState) { - yield* takeEvery('*', function* logger(action) { - console.log('action', action) - }) - } - - function* fetchUser(action) { - } - - function* watchLastFetchUser() { - yield* takeLatest('USER_REQUESTED', fetchUser) - } -} - -namespace AccessCurrentState { - export const getCart = state => state.cart; - - function* checkout() { - const cart = yield select(getCart) - } -} diff --git a/redux-saga/tsconfig.json b/redux-saga/tsconfig.json deleted file mode 100644 index a844a73999..0000000000 --- a/redux-saga/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": false, - "noImplicitThis": false, - "strictNullChecks": false, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "redux-saga-tests.ts" - ] -} \ No newline at end of file From a0326f82e3b8f7e7ab0f36bdf934616a4351435a Mon Sep 17 00:00:00 2001 From: Daniel Herman Date: Wed, 25 Jan 2017 14:04:47 -0500 Subject: [PATCH 34/54] Add the `headers` property to the exported interface --- http-errors/http-errors-tests.ts | 1 + http-errors/index.d.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/http-errors/http-errors-tests.ts b/http-errors/http-errors-tests.ts index af06b3ebc6..e8c12126b4 100644 --- a/http-errors/http-errors-tests.ts +++ b/http-errors/http-errors-tests.ts @@ -26,6 +26,7 @@ console.log(err.message); console.log(err.status); console.log(err.statusCode); console.log(err.expose); +console.log(err.headers); // createError(status, msg) var err = createError(404, 'LOL'); diff --git a/http-errors/index.d.ts b/http-errors/index.d.ts index e70d1d973c..176703f23f 100644 --- a/http-errors/index.d.ts +++ b/http-errors/index.d.ts @@ -11,6 +11,9 @@ declare module 'http-errors' { status: number; statusCode: number; expose: boolean; + headers?: { + [key: string]: string + }; } type HttpErrorConstructor = new(msg?: string) => HttpError; From ba1f4665faa1841b86bdd3da7dfd75bc469110b5 Mon Sep 17 00:00:00 2001 From: zigomir Date: Wed, 25 Jan 2017 11:12:26 -0800 Subject: [PATCH 35/54] Allow cursorTo to preserve the column. --- node/v4/index.d.ts | 2 +- node/v6/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/node/v4/index.d.ts b/node/v4/index.d.ts index 027387719d..99af57b082 100644 --- a/node/v4/index.d.ts +++ b/node/v4/index.d.ts @@ -987,7 +987,7 @@ declare module "readline" { export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer, terminal?: boolean): ReadLine; export function createInterface(options: ReadLineOptions): ReadLine; - export function cursorTo(stream: NodeJS.WritableStream, x: number, y: number): void; + export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number): void; export function moveCursor(stream: NodeJS.WritableStream, dx: number|string, dy: number|string): void; export function clearLine(stream: NodeJS.WritableStream, dir: number): void; export function clearScreenDown(stream: NodeJS.WritableStream): void; diff --git a/node/v6/index.d.ts b/node/v6/index.d.ts index ed07d1cad1..2f4d36202d 100644 --- a/node/v6/index.d.ts +++ b/node/v6/index.d.ts @@ -1507,7 +1507,7 @@ declare module "readline" { export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer, terminal?: boolean): ReadLine; export function createInterface(options: ReadLineOptions): ReadLine; - export function cursorTo(stream: NodeJS.WritableStream, x: number, y: number): void; + export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number): void; export function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void; export function clearLine(stream: NodeJS.WritableStream, dir: number): void; export function clearScreenDown(stream: NodeJS.WritableStream): void; From dc8471ffcd2b8d29a675680e0eb518e74cceeff3 Mon Sep 17 00:00:00 2001 From: Pine Mizune Date: Wed, 25 Jan 2017 02:39:52 +0900 Subject: [PATCH 36/54] add type definition for voca --- voca/index.d.ts | 304 +++++++++++++++++++++++++++++++++++++++++ voca/tsconfig.json | 23 ++++ voca/tslint.json | 1 + voca/voca-tests.ts | 331 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 659 insertions(+) create mode 100644 voca/index.d.ts create mode 100644 voca/tsconfig.json create mode 100644 voca/tslint.json create mode 100644 voca/voca-tests.ts diff --git a/voca/index.d.ts b/voca/index.d.ts new file mode 100644 index 0000000000..7a7fa6e6c5 --- /dev/null +++ b/voca/index.d.ts @@ -0,0 +1,304 @@ +// Type definitions for Voca 1.2 +// Project: https://vocajs.com/ +// Definitions by: Pine Mizune +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare var v: v.VocaStatic; + +export = v; +export as namespace v; + +declare namespace v { + type CountPredicate = (character: string, index: number, str: string) => boolean; + type ReplacementFunction = (match?: string, ...groups: string[]) => string; + + interface WordWrapOptions { + width?: number; + newLine?: string; + indent?: string; + cut?: boolean; + } + + interface VocaStatic { + // Case + camelCase(subject?: string): string; + capitalize(subject?: string, restToLower?: boolean): string; + decapitalize(subject?: string): string; + kebabCase(subject?: string): string; + lowerCase(subject?: string): string; + snakeCase(subject?: string): string; + titleCase(subject?: string, ignoreWords?: string[]): string; + upperCase(subject?: string): string; + + // Chain + (subject: any): Chain; + chain(subject: T): ExplicitChain; + + // Chop + charAt(subject?: string, position?: number): string; + codePointAt(subject?: string, position?: number): string; + first(subject?: string, length?: number): string; + graphemeAt(subject?: string, position?: number): string; + last(subject?: string, length?: number): string; + prune(subject?: string, length?: number, end?: string): string; + slice(subject?: string, start?: number, end?: number): string; + substr(subject?: string, start?: number, length?: number): string; + substring(subject?: string, start?: number, end?: number): string; + truncate(subject?: string, length?: number, end?: string): string; + + // Count + count(subject?: string): number; + countGraphemes(subject?: string): number; + countSubstrings(subject?: string, substring?: string): number; + countWhere(subject?: string, predicate?: CountPredicate, context?: any): number; + countWords(subject?: string, pattern?: string|RegExp, flags?: string): number; + + // Escape + escapeHtml(subject?: string): string; + escapeRegExp(subject?: string): string; + unescapeHtml(subject?: string): string; + + // Format + sprintf(format?: string, ...replacements: any[]): string; + vprintf(format?: string, ...replacements: any[]): string; + + // Index + indexOf(subject?: string, search?: string, fromIndex?: number): number; + lastIndexOf(subject?: string, search?: string, fromIndex?: number): number; + search(subject?: string, pattern?: string|RegExp, fromIndex?: number): number; + + // Manipulate + insert(subject?: string, toInsert?: string, position?: number): string; + latinise(subject?: string): string; + pad(subject?: string, length?: number, pad?: string): string; + padLeft(subject?: string, length?: number, pad?: string): string; + padRight(subject?: string, length?: number, pad?: string): string; + repeat(subject?: string, times?: number): string; + replace(subject?: string, pattern?: string|RegExp, replacement?: string|ReplacementFunction): string; + replaceAll(subject?: string, pattern?: string|RegExp, replacement?: string|ReplacementFunction): string; + reverse(subject?: string): string; + reverseGrapheme(subject?: string): string; + slugify(subject?: string): string; + splice(subject?: string, start?: number, deleteCount?: number, toAdd?: string): string; + trim(subject?: string, whitespace?: string): string; + trimLeft(subject?: string, whitespace?: string): string; + trimRight(subject?: string, whitespace?: string): string; + wordWrap(subject?: string, options?: WordWrapOptions): string; + + // Query + endsWith(subject?: string, end?: string, position?: number): boolean; + includes(subject?: string, search?: string, position?: number): boolean; + isAlpha(subject?: string): boolean; + isAlphaDigit(subject?: string): boolean; + isBlank(subject?: string): boolean; + isDigit(subject?: string): boolean; + isEmpty(subject?: string): boolean; + isLowerCase(subject?: string): boolean; + isNumeric(subject?: string): boolean; + isString(subject?: any): boolean; + isUpperCase(subject?: string): boolean; + matches(subject?: string, pattern?: string|RegExp, flags?: string): boolean; + startsWith(subject?: string, start?: string, position?: number): boolean; + + // Split + chars(subject?: string): string[]; + codePoints(subject?: string): number[]; + graphemes(subject?: string): string[]; + split(subject?: string, separator?: string|RegExp, limit?: number): string[]; + words(subject?: string, pattern?: string|RegExp, flag?: string): string[]; + + // Strip + stripBom(subject?: string): string; + stripTags(subject?: string, allowbleTags?: string|string[], replacement?: string): string; + + // Util + noConflict(): VocaStatic; + version: string; + } + + interface Chain { + // Case + camelCase(): Chain; + capitalize(restToLoweropt?: boolean): Chain; + decapitalize(): Chain; + kebabCase(): Chain; + lowerCase(): Chain; + snakeCase(): Chain; + titleCase(ignoreWordsopt?: string[]): Chain; + upperCase(): Chain; + + // Chain + value(): string; + chain(): ExplicitChain; + + // Chop + charAt(position?: number): Chain; + codePointAt(position?: number): Chain; + first(length?: number): Chain; + graphemeAt(position?: number): Chain; + last(length?: number): Chain; + prune(length?: number, end?: string): Chain; + slice(start?: number, end?: number): Chain; + substr(start?: number, length?: number): Chain; + substring(start?: number, end?: number): Chain; + truncate(length?: number, end?: string): Chain; + + // Count + count(): number; + countGraphemes(): number; + countSubstrings(substring?: string): number; + countWhere(predicate?: CountPredicate, context?: any): number; + countWords(pattern?: string|RegExp, flags?: string): number; + + // Escape + escapeHtml(): Chain; + escapeRegExp(): Chain; + unescapeHtml(): Chain; + + // Format + sprintf(...replacements: any[]): Chain; + vprintf(...replacements: any[]): Chain; + + // Index + indexOf(search?: string, fromIndex?: number): number; + lastIndexOf(search?: string, fromIndex?: number): number; + search(pattern?: string|RegExp, fromIndex?: number): number; + + // Multipulate + insert(toInsert?: string, position?: number): Chain; + latinise(): Chain; + pad(length?: number, pad?: string): Chain; + padLeft(length?: number, pad?: string): Chain; + padRight(length?: number, pad?: string): Chain; + repeat(times?: number): Chain; + replace(pattern?: string|RegExp, replacement?: string|ReplacementFunction): Chain; + replaceAll(pattern?: string|RegExp, replacement?: string|ReplacementFunction): Chain; + reverse(): Chain; + reverseGrapheme(): Chain; + slugify(): Chain; + splice(start?: number, deleteCount?: number, toAdd?: string): Chain; + trim(whitespace?: string): Chain; + trimLeft(whitespace?: string): Chain; + trimRight(whitespace?: string): Chain; + wordWrap(options?: WordWrapOptions): Chain; + + // Query + endsWith(end?: string, position?: number): boolean; + includes(search?: string, position?: number): boolean; + isAlpha(): boolean; + isAlphaDigit(): boolean; + isBlank(): boolean; + isDigit(): boolean; + isEmpty(): boolean; + isLowerCase(): boolean; + isNumeric(): boolean; + isString(): boolean; + isUpperCase(): boolean; + matches(pattern?: string|RegExp, flags?: string): boolean; + startsWith(start?: string, position?: number): boolean; + + // Split + chars(): string[]; + codePoints(): number[]; + graphemes(): string[]; + split(separator?: string|RegExp, limit?: number): string[]; + words(pattern?: string|RegExp, flag?: string): string[]; + + // Strip + stripBom(): Chain; + stripTags(allowbleTags?: string|string[], replacement?: string): Chain; + } + + interface ExplicitChain { + // Case + camelCase(): ExplicitChain; + capitalize(restToLoweropt?: boolean): ExplicitChain; + decapitalize(): ExplicitChain; + kebabCase(): ExplicitChain; + lowerCase(): ExplicitChain; + snakeCase(): ExplicitChain; + titleCase(ignoreWordsopt?: string[]): ExplicitChain; + upperCase(): ExplicitChain; + + // Chain + value(): T; + thru(changer: (subjects: T) => U): ExplicitChain; + + // Chop + charAt(position?: number): ExplicitChain; + codePointAt(position?: number): ExplicitChain; + first(length?: number): ExplicitChain; + graphemeAt(position?: number): ExplicitChain; + last(length?: number): ExplicitChain; + prune(length?: number, end?: string): ExplicitChain; + slice(start?: number, end?: number): ExplicitChain; + substr(start?: number, length?: number): ExplicitChain; + substring(start?: number, end?: number): ExplicitChain; + truncate(length?: number, end?: string): ExplicitChain; + + // Count + count(): ExplicitChain; + countGraphemes(): ExplicitChain; + countSubstrings(substring?: string): ExplicitChain; + countWhere(predicate?: CountPredicate, context?: any): ExplicitChain; + countWords(pattern?: string|RegExp, flags?: string): ExplicitChain; + + // Escape + escapeHtml(): ExplicitChain; + escapeRegExp(): ExplicitChain; + unescapeHtml(): ExplicitChain; + + // Format + sprintf(...replacements: any[]): ExplicitChain; + vprintf(...replacements: any[]): ExplicitChain; + + // Index + indexOf(search?: string, fromIndex?: number): ExplicitChain; + lastIndexOf(search?: string, fromIndex?: number): ExplicitChain; + search(pattern?: string|RegExp, fromIndex?: number): ExplicitChain; + + // Multipulate + insert(toInsert?: string, position?: number): ExplicitChain; + latinise(): ExplicitChain; + pad(length?: number, pad?: string): ExplicitChain; + padLeft(length?: number, pad?: string): ExplicitChain; + padRight(length?: number, pad?: string): ExplicitChain; + repeat(times?: number): ExplicitChain; + replace(pattern?: string|RegExp, replacement?: string|ReplacementFunction): ExplicitChain; + replaceAll(pattern?: string|RegExp, replacement?: string|ReplacementFunction): ExplicitChain; + reverse(): ExplicitChain; + reverseGrapheme(): ExplicitChain; + slugify(): ExplicitChain; + splice(start?: number, deleteCount?: number, toAdd?: string): ExplicitChain; + trim(whitespace?: string): ExplicitChain; + trimLeft(whitespace?: string): ExplicitChain; + trimRight(whitespace?: string): ExplicitChain; + wordWrap(options?: WordWrapOptions): ExplicitChain; + + // Query + endsWith(end?: string, position?: number): ExplicitChain; + includes(search?: string, position?: number): ExplicitChain; + isAlpha(): ExplicitChain; + isAlphaDigit(): ExplicitChain; + isBlank(): ExplicitChain; + isDigit(): ExplicitChain; + isEmpty(): ExplicitChain; + isLowerCase(): ExplicitChain; + isNumeric(): ExplicitChain; + isString(): ExplicitChain; + isUpperCase(): ExplicitChain; + matches(pattern?: string|RegExp, flags?: string): ExplicitChain; + startsWith(start?: string, position?: number): ExplicitChain; + + // Split + chars(): ExplicitChain; + codePoints(): ExplicitChain; + graphemes(): ExplicitChain; + split(separator?: string|RegExp, limit?: number): ExplicitChain; + words(pattern?: string|RegExp, flag?: string): ExplicitChain; + + // Strip + stripBom(): ExplicitChain; + stripTags(allowbleTags?: string|string[], replacement?: string): ExplicitChain; + } +} diff --git a/voca/tsconfig.json b/voca/tsconfig.json new file mode 100644 index 0000000000..e7cd2ff035 --- /dev/null +++ b/voca/tsconfig.json @@ -0,0 +1,23 @@ + +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "voca-tests.ts" + ] +} diff --git a/voca/tslint.json b/voca/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/voca/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/voca/voca-tests.ts b/voca/voca-tests.ts new file mode 100644 index 0000000000..3fb9d100c3 --- /dev/null +++ b/voca/voca-tests.ts @@ -0,0 +1,331 @@ +import v = require('voca'); + +var str: string; +var num: number +var bool: boolean; +var strAry: string[]; +var numAry: number[]; + +// Case +str = v.camelCase(); +str = v.camelCase('bird flight'); +str = v('bird flight').camelCase().value(); +str = v.chain('bird flight').camelCase().value(); + +str = v.capitalize(); +str = v.capitalize('apple'); +str = v.capitalize('aPPle', true); +str = v('apple').capitalize().value(); +str = v('apple').capitalize(true).value(); +str = v.chain('apple').capitalize(true).value(); + +str = v.decapitalize('Sun'); +str = v.kebabCase('goodbye blue sky'); +str = v.lowerCase('Green'); +str = v.snakeCase('learning to fly'); +str = v.titleCase('learning to fly'); +str = v.titleCase('another brick in the wall', ['in', 'the']); +str = v.upperCase('school'); + +// Chain +strAry = v('Back to School') + .lowerCase() + .words(); +str = v(" Back to School ") + .trim() + .truncate(7) + .value(); + +strAry = v + .chain('Back to School') + .lowerCase() + .words() + .value(); + +strAry = v('Back to School') + .chain() + .lowerCase() + .words() + .value(); +str = v(" Back to School ") + .chain() + .trim() + .truncate(7) + .value(); + +str = v + .chain('sun is shining') + .words() + .thru((words: string[]) => { + return words[0]; + }) + .value(); + +str = v + .chain('Hello world') + .replace('Hello', 'Hi') + .lowerCase() + .slugify() + .value(); +str = v(' Space travel ') + .trim() + .truncate(8) + .value(); + +// Chop +str = v.charAt('helicopter', 0); +str = v('helicopter').charAt(0).value(); +str = v.chain('helicopter').charAt(0).value(); + +str = v.codePointAt('rain', 1); +str = v.first('helicopter'); +str = v.first('vehicle', 2); +str = v.graphemeAt('\uD835\uDC00\uD835\uDC01', 0); +str = v.last('helicopter'); +str = v.last('vehicle', 2); +str = v.prune('Once upon a time', 7); +str = v.prune('Good day, Little Red Riding Hood', 16, ' (more)'); +str = v.slice('miami', 1); +str = v.slice('florida', 1, 4); +str = v.substr('infinite loop', 9); +str = v.substr('dreams', 2, 2); +str = v.substring('beach', 1); +str = v.substring('ocean', 1, 3); +str = v.truncate('Once upon a time', 7); +str = v.truncate('Good day, Little Red Riding Hood', 14, ' (...)'); + +// Count +num = v.count(); +num = v.count('rain'); +num = v('rain').count(); +num = v.chain('rain').count().value(); + +num = v.countGraphemes('cafe\u0301'); +num = v.countSubstrings('bad boys, bad boys whatcha gonna do?', 'boys'); +num = v.countWhere('hola!', v.isAlpha); +num = v.countWhere('2022', (character: string, index: number, str: string) => { + return character === '2'; +}); +num = v.countWords('gravity can cross dimensions'); + +// Escape +str = v.escapeHtml(); +str = v.escapeHtml('

wonderful world

'); +str = v('

wonderful world

').escapeHtml().value(); +str = v.chain('

wonderful world

').escapeHtml().value(); + +str = v.escapeRegExp(); +str = v.escapeRegExp('(hours)[minutes]{seconds}'); +str = v('(hours)[minutes]{seconds}').escapeRegExp().value(); +str = v.chain('(hours)[minutes]{seconds}').escapeRegExp().value(); + +str = v.unescapeHtml(); +str = v.unescapeHtml('<p>wonderful world</p>'); +str = v('<p>wonderful world</p>').unescapeHtml().value(); +str = v.chain('<p>wonderful world</p>').unescapeHtml().value(); + +// Format +str = v.sprintf(); +str = v.sprintf('%s, %s!', 'Hello', 'World'); +str = v.sprintf('%s costs $%d', 'coffee', 2); +str = v.sprintf('%1$s %2$s %1$s %2$s, watcha gonna %3$s', 'bad', 'boys', 'do') +str = v.sprintf('% 6s', 'bird'); +str = v.sprintf('%d %i %+d', 15, -2, 25); +str = v.sprintf("%06d", 15); +str = v.sprintf('%.2e %g', 100.5, 0.455); +str = v('%s, %s!').sprintf('Hello', 'World').value(); +str = v.chain('%s, %s!').sprintf('Hello', 'World').value(); + +str = v.vprintf(); +str = v.vprintf('%s', ['Welcome']) +str = v.vprintf('%s has %d apples', ['Alexandra', 3]); +str = v('%s').vprintf(['Welcome']).value(); +str = v.chain('%s').vprintf(['Welcome']).value(); + +// Index +num = v.indexOf(); +num = v.indexOf('morning'); +num = v.indexOf('morning', 'n'); +num = v('morning').indexOf('n'); +num = v.chain('morning').indexOf('n').value(); + +num = v.lastIndexOf(); +num = v.lastIndexOf('morning'); +num = v.lastIndexOf('morning', 'n'); +num = v('morning').lastIndexOf('n'); +num = v.chain('morning').lastIndexOf('n').value(); + +num = v.search('morning', /rn/); +num = v.search('evening', '/\d/'); + +// Manipulate +str = v.insert(); +str = v.insert('ct'); +str = v.insert('ct', 'a'); +str = v.insert('ct', 'a', 1); +str = v('ct').insert('a', 1).value(); +str = v.chain('ct').insert('a', 1).value(); + +str = v.latinise(); +str = v.latinise('cafe\u0301'); + +str = v.pad(); +str = v.pad('dog'); +str = v.pad('dog', 5); +str = v.pad('bird', 6, '-'); + +str = v.padLeft(); +str = v.padLeft('dog'); +str = v.padLeft('dog', 5); +str = v.padLeft('bird', 6, '-'); + +str = v.padRight(); +str = v.padRight('dog'); +str = v.padRight('dog', 5); +str = v.padRight('bird', 6, '-'); + +str = v.repeat(); +str = v.repeat('w'); +str = v.repeat('w', 3); + +str = v.replace(); +str = v.replace('swan', 'wa', 'u'); +str = v.replace('domestic duck', /domestic\s/, ''); +str = v.replace('nice duck', /(nice)(duck)/, (match: string, nice: string, duck: string) => { + return 'the ' + duck + ' is ' + nice; +}); + +str = v.replaceAll(); +str = v.replaceAll('good morning', 'o', '*'); +str = v.replaceAll('evening', /n/, 's'); + +str = v.reverse(); +str = v.reverse('winter'); + +str = v.reverseGrapheme(); +str = v.reverseGrapheme('summer'); + +str = v.slugify(); +str = v.slugify('Italian cappuccino drink'); + +str = v.splice(); +str = v.splice('new year'); +str = v.splice('new year', 0); +str = v.splice('new year', 0, 4); +str = v.splice('new year', 0, 3, 'happy'); + +str = v.trim(); +str = v.trim(' Mother nature '); +str = v.trim('--Earth--', '-'); + +str = v.trimLeft(); +str = v.trimLeft(' Starship Troopers'); +str = v.trimLeft('***Mobile Infantry', '*'); + +str = v.trimRight(); +str = v.trimRight('the fire rises '); +str = v.trimRight('do you feel in charge?!!!', '!'); + +str = v.wordWrap(); +str = v.wordWrap('Hello world'); +str = v.wordWrap('Hello world', { + width: 5 +}); +str = v.wordWrap('Hello world', { + width: 5, + newLine: '
', + indent: '__' +}); +str = v.wordWrap('Wonderful world', { + width: 5, + cut: true +}); + +// Query +bool = v.endsWith(); +bool = v.endsWith('red alert'); +bool = v.endsWith('red alert', 'alert'); +bool = v.endsWith('Murphy', 'ph', 5); +bool = v('Murphy').endsWith('ph', 5); +bool = v.chain('Murphy').endsWith('ph', 5).value(); + +bool = v.includes(); +bool = v.includes('starship'); +bool = v.includes('starship', 'star'); +bool = v.includes('galaxy', 'g', 1); +bool = v('galaxy').includes('g', 1); +bool = v.chain('galaxy').includes('g', 1).value(); + +bool = v.isAlpha(); +bool = v.isAlpha('bart'); + +bool = v.isAlphaDigit(); +bool = v.isAlphaDigit('year2020'); + +bool = v.isBlank(); +bool = v.isBlank(''); + +bool = v.isDigit(); +bool = v.isDigit('35'); + +bool = v.isEmpty(); +bool = v.isEmpty(''); + +bool = v.isLowerCase(); +bool = v.isLowerCase('motorcycle'); + +bool = v.isNumeric(); +bool = v.isNumeric('350'); + +bool = v.isString(); +bool = v.isString('vacation'); +bool = v.isString(560); +bool = v('vacation').isString(); +bool = v(560).isString(); +bool = v.chain('vacation').isString().value(); +bool = v.chain(560).isString().value(); + +bool = v.isUpperCase(); +bool = v.isUpperCase('ACDC'); + +bool = v.matches(); +bool = v.matches('pluto'); +bool = v.matches('pluto', /plu.{2}/); +bool = v.matches('sun', 'S', 'i'); +bool = v.matches('apollo 11', '\\d{3}'); + +bool = v.startsWith(); +bool = v.startsWith('say hello to my little friend'); +bool = v.startsWith('say hello to my little friend', 'say hello'); +bool = v.startsWith('tony', 'on', 1); +bool = v.startsWith('the world is yours', 'world'); + +// Split +strAry = v.chars(); +strAry = v.chars('cloud'); + +numAry = v.codePoints(); +numAry = v.codePoints('rain'); + +strAry = v.graphemes(); +strAry = v.graphemes('\uD835\uDC00\uD835\uDC01'); + +strAry = v.split('rage against the dying of the light', ' '); +strAry = v.split('the dying of the light', /\s/, 3); + +strAry = v.words(); +strAry = v.words('gravity can cross dimensions'); +strAry = v.words('Earth gravity', /[^\s]+/g); + +// Strip +str = v.stripBom(); +str = v.stripBom('\uFEFFsummertime sadness'); + +str = v.stripTags(); +str = v.stripTags('Summer is nice'); +str = v.stripTags('Winter is cold', ['b', 'i']); +str = v.stripTags('Sun
set', '', '-'); + +// Util +var voca: v.VocaStatic = v.noConflict(); +var version: String = v.version; From 4c4b7eb90069d7eb7acb32bab636c29a3ceddeeb Mon Sep 17 00:00:00 2001 From: Olmo del Corral Date: Wed, 25 Jan 2017 21:14:54 +0100 Subject: [PATCH 37/54] add defaultCurrentDate --- react-widgets/lib/DateTimePicker.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/react-widgets/lib/DateTimePicker.d.ts b/react-widgets/lib/DateTimePicker.d.ts index 37e1474416..3c4aadde29 100644 --- a/react-widgets/lib/DateTimePicker.d.ts +++ b/react-widgets/lib/DateTimePicker.d.ts @@ -31,6 +31,10 @@ interface DateTimePickerProps extends React.Props { * @default Date() */ currentDate?: Date; + /* + * Default value for current date. Usefull for suggesting a date when the caldenar opens without keep forcing it once 'value' is set. + */ + defaultCurrentDate?: Date /** * Change event Handler that is called when the currentDate is changed. The handler is * called with the currentDate object. From 1ad011f1f6668cc9ea8fe008ca53b6d38dfbd34f Mon Sep 17 00:00:00 2001 From: Olmo del Corral Date: Wed, 25 Jan 2017 21:22:54 +0100 Subject: [PATCH 38/54] add defaultOpen --- react-widgets/lib/DropdownList.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/react-widgets/lib/DropdownList.d.ts b/react-widgets/lib/DropdownList.d.ts index f8ac6d6579..aac6ba4765 100644 --- a/react-widgets/lib/DropdownList.d.ts +++ b/react-widgets/lib/DropdownList.d.ts @@ -87,10 +87,14 @@ interface DropdownListProps extends React.Props { onSearch?: (searchTerm: string) => void; /** * Whether or not the DropdownList is open. When unset (undefined) the DropdownList will - * handle the opening and closing internally. The defaultOpen prop can be used to set an - * initialization value for uncontrolled widgets. + * handle the opening and closing internally. */ open?: boolean; + /** + * The defaultOpen prop can be used to set an + * initialization value for uncontrolled widgets. + */ + defaultOpen?: boolean; /** * Called when the DropdownList is about to open or close. onToggle should be used when the * open prop is set otherwise the widget open buttons won't work. From fbe1aee12d05e849bb728896a20b1b30e53758f8 Mon Sep 17 00:00:00 2001 From: Jeff Kenney Date: Wed, 25 Jan 2017 11:58:55 -0800 Subject: [PATCH 39/54] knex: use import = require() syntax --- knex/index.d.ts | 4 ++-- knex/knex-tests.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/knex/index.d.ts b/knex/index.d.ts index 910bab9d04..5196f47eb0 100644 --- a/knex/index.d.ts +++ b/knex/index.d.ts @@ -6,8 +6,8 @@ /// /// -import * as events from "events"; -import * as Promise from "bluebird"; +import events = require("events"); +import Promise = require("bluebird"); type Callback = Function; type Client = Function; diff --git a/knex/knex-tests.ts b/knex/knex-tests.ts index 8c1878760b..420aafd724 100644 --- a/knex/knex-tests.ts +++ b/knex/knex-tests.ts @@ -1,7 +1,7 @@ "use strict"; -import * as Knex from 'knex'; -import * as Promise from 'bluebird'; -import * as _ from 'lodash'; +import Knex = require('knex'); +import Promise = require('bluebird'); +import _ = require('lodash'); // Initializing the Library var knex = Knex({ From 68f67afc33480c9e218fe5d8c31b26b1e07b0c93 Mon Sep 17 00:00:00 2001 From: Olmo del Corral Date: Wed, 25 Jan 2017 22:34:16 +0100 Subject: [PATCH 40/54] fix semicolon and add DateTimePicker defaultOpen --- react-widgets/lib/DateTimePicker.d.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/react-widgets/lib/DateTimePicker.d.ts b/react-widgets/lib/DateTimePicker.d.ts index 3c4aadde29..fe090507d3 100644 --- a/react-widgets/lib/DateTimePicker.d.ts +++ b/react-widgets/lib/DateTimePicker.d.ts @@ -34,7 +34,7 @@ interface DateTimePickerProps extends React.Props { /* * Default value for current date. Usefull for suggesting a date when the caldenar opens without keep forcing it once 'value' is set. */ - defaultCurrentDate?: Date + defaultCurrentDate?: Date; /** * Change event Handler that is called when the currentDate is changed. The handler is * called with the currentDate object. @@ -97,11 +97,16 @@ interface DateTimePickerProps extends React.Props { onSelect?: (date?: Date) => void; /** * Whether or not the DateTimePicker is open. When unset (undefined) the DateTimePicker will - * handle the opening and closing internally. The defaultOpen prop can be used to set an - * initialization value for uncontrolled widgets. + * handle the opening and closing internally. * @enum false "calendar" "time" */ open?: boolean | "calendar" | "time"; + /** + * The defaultOpen prop can be used to set an + * initialization value for uncontrolled widgets. + * @enum false "calendar" "time" + */ + defaultOpen?: boolean | "calendar" | "time"; /** * Called when the DateTimePicker is about to open or close. onToggle should be used when * the open prop is set otherwise the widget will never open or close. From 1934bbf00f9981b0250c5a57db046b5318eb7c2c Mon Sep 17 00:00:00 2001 From: Olmo del Corral Date: Wed, 25 Jan 2017 23:04:21 +0100 Subject: [PATCH 41/54] switch tab -> spaces --- react-widgets/lib/DateTimePicker.d.ts | 2 +- react-widgets/lib/DropdownList.d.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/react-widgets/lib/DateTimePicker.d.ts b/react-widgets/lib/DateTimePicker.d.ts index fe090507d3..6428927cf4 100644 --- a/react-widgets/lib/DateTimePicker.d.ts +++ b/react-widgets/lib/DateTimePicker.d.ts @@ -31,7 +31,7 @@ interface DateTimePickerProps extends React.Props { * @default Date() */ currentDate?: Date; - /* + /* * Default value for current date. Usefull for suggesting a date when the caldenar opens without keep forcing it once 'value' is set. */ defaultCurrentDate?: Date; diff --git a/react-widgets/lib/DropdownList.d.ts b/react-widgets/lib/DropdownList.d.ts index aac6ba4765..52a8e83a99 100644 --- a/react-widgets/lib/DropdownList.d.ts +++ b/react-widgets/lib/DropdownList.d.ts @@ -90,11 +90,11 @@ interface DropdownListProps extends React.Props { * handle the opening and closing internally. */ open?: boolean; - /** + /** * The defaultOpen prop can be used to set an * initialization value for uncontrolled widgets. */ - defaultOpen?: boolean; + defaultOpen?: boolean; /** * Called when the DropdownList is about to open or close. onToggle should be used when the * open prop is set otherwise the widget open buttons won't work. From df1efcebfb309e85d4d22cccec8cd42b6a9236bb Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Wed, 25 Jan 2017 14:08:40 -0800 Subject: [PATCH 42/54] Issue template: Clarify that authors should be found in the header --- ISSUE_TEMPLATE.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index a9ae498738..252df5994f 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -1,5 +1,4 @@ -- [ ] I tried using the latest `xxxx/xxxx.d.ts` file in this repo and had problems. +- [ ] I tried using the `@types/xxxx` package and had problems. - [ ] I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript - [ ] I have a question that is inappropriate for [StackOverflow](https://stackoverflow.com/). (Please ask any appropriate questions there). -- [ ] I want to talk about `xxxx/xxxx.d.ts`. - - The authors of that type definition are cc/ @.... +- The authors (see `Definitions by:` in `index.d.ts`) are cc/ @.... From 2157659af755ca9ab5fc959562f5033c5d7a1398 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Wed, 25 Jan 2017 20:11:21 -0500 Subject: [PATCH 43/54] Add type definitions for semantic-ui. --- semantic-ui/index.d.ts | 5434 ++++++++++++++++++++++++++++++ semantic-ui/semantic-ui-tests.ts | 140 + semantic-ui/tsconfig.json | 20 + semantic-ui/tslint.json | 3 + 4 files changed, 5597 insertions(+) create mode 100644 semantic-ui/index.d.ts create mode 100644 semantic-ui/semantic-ui-tests.ts create mode 100644 semantic-ui/tsconfig.json create mode 100644 semantic-ui/tslint.json diff --git a/semantic-ui/index.d.ts b/semantic-ui/index.d.ts new file mode 100644 index 0000000000..0c8ddda9be --- /dev/null +++ b/semantic-ui/index.d.ts @@ -0,0 +1,5434 @@ +// Type definitions for Semantic UI 2.2 +// Project: http://semantic-ui.com/ +// Definitions by: Leonard Thieu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +// tslint:disable:unified-signatures + +interface JQuery { + // TODO: Do all modules have a 'setting' behavior? + + // region Modules + + // region Accordion + + /** + * Refreshes all cached selectors and data + */ + accordion(behavior: 'refresh'): JQuery; + /** + * Opens accordion content at index + */ + accordion(behavior: 'open', index: number): JQuery; + /** + * Closes accordion content that are not active + */ + accordion(behavior: 'close others'): JQuery; + /** + * Closes accordion content at index + */ + accordion(behavior: 'close', index: number): JQuery; + /** + * Toggles accordion content at index + */ + accordion(behavior: 'toggle', index: number): JQuery; + accordion(settings: SemanticUI.AccordionSettings): JQuery; + accordion(): JQuery; + + // endregion + + // region Checkbox + + /** + * Switches a checkbox from current state + */ + checkbox(behavior: 'toggle'): JQuery; + /** + * Set a checkbox state to checked + */ + checkbox(behavior: 'check'): JQuery; + /** + * Set a checkbox state to unchecked + */ + checkbox(behavior: 'uncheck'): JQuery; + /** + * Set as indeterminate checkbox + */ + checkbox(behavior: 'indeterminate'): JQuery; + /** + * Set as determinate checkbox + */ + checkbox(behavior: 'determinate'): JQuery; + /** + * Enable interaction with a checkbox + */ + checkbox(behavior: 'enable'): JQuery; + /** + * Set a checkbox state to checked without callbacks + */ + checkbox(behavior: 'set checked'): JQuery; + /** + * Set a checkbox state to unchecked without callbacks + */ + checkbox(behavior: 'set unchecked'): JQuery; + /** + * Set as indeterminate checkbox without callbacks + */ + checkbox(behavior: 'set indeterminate'): JQuery; + /** + * Set as determinate checkbox without callbacks + */ + checkbox(behavior: 'set determinate'): JQuery; + /** + * Enable interaction with a checkbox without callbacks + */ + checkbox(behavior: 'set enabled'): JQuery; + /** + * Disable interaction with a checkbox without callbacks + */ + checkbox(behavior: 'set disabled'): JQuery; + /** + * Attach checkbox events to another element + */ + checkbox(behavior: 'attach events', selector: string, event: string): JQuery; + /** + * Returns whether element is radio selection + */ + checkbox(behavior: 'is radio'): boolean; + /** + * Returns whether element is currently checked + */ + checkbox(behavior: 'is checked'): boolean; + /** + * Returns whether element is not checked + */ + checkbox(behavior: 'is unchecked'): boolean; + /** + * Returns whether element is able to be changed + */ + checkbox(behavior: 'can change'): boolean; + /** + * Returns whether element can be checked (checking if already checked or `beforeChecked` would cancel) + */ + checkbox(behavior: 'should allow check'): boolean; + /** + * Returns whether element can be unchecked (checking if already unchecked or `beforeUnchecked` would cancel) + */ + checkbox(behavior: 'should allow uncheck'): boolean; + /** + * Returns whether element can be determinate (checking if already determinate or `beforeDeterminate` would cancel) + */ + checkbox(behavior: 'should allow determinate'): boolean; + /** + * Returns whether element can be indeterminate (checking if already indeterminate or `beforeIndeterminate` would cancel) + */ + checkbox(behavior: 'should allow indeterminate'): boolean; + /** + * Returns whether element is able to be unchecked + */ + checkbox(behavior: 'can uncheck'): boolean; + checkbox(settings: SemanticUI.CheckboxSettings): JQuery; + checkbox(): JQuery; + + // endregion + + // region Dimmer + + /** + * Detaches a given element from DOM and reattaches element inside dimmer + */ + dimmer(behavior: 'add content', element: SemanticUI.Selector): JQuery; + /** + * Shows dimmer + */ + dimmer(behavior: 'show'): JQuery; + /** + * Hides dimmer + */ + dimmer(behavior: 'hide'): JQuery; + /** + * Toggles current dimmer visibility + */ + dimmer(behavior: 'toggle'): JQuery; + /** + * Changes dimmer opacity + */ + dimmer(behavior: 'set opacity', opacity: number): JQuery; + /** + * Creates a new dimmer in dimmable context + */ + dimmer(behavior: 'create'): JQuery; + /** + * Returns current duration for show or hide event depending on current visibility + */ + dimmer(behavior: 'get duration'): number; + /** + * Returns DOM element for dimmer + */ + dimmer(behavior: 'get dimmer'): JQuery; + /** + * Returns whether current dimmable has a dimmer + */ + dimmer(behavior: 'has dimmer'): boolean; + /** + * Whether section's dimmer is active + */ + dimmer(behavior: 'is active'): boolean; + /** + * Whether dimmer is animating + */ + dimmer(behavior: 'is animating'): boolean; + /** + * Whether current element is a dimmer + */ + dimmer(behavior: 'is dimmer'): boolean; + /** + * Whether current element is a dimmable section + */ + dimmer(behavior: 'is dimmable'): boolean; + /** + * Whether dimmer is disabled + */ + dimmer(behavior: 'is disabled'): boolean; + /** + * Whether dimmer is not disabled + */ + dimmer(behavior: 'is enabled'): boolean; + /** + * Whether dimmable section is body + */ + dimmer(behavior: 'is page'): boolean; + /** + * Whether dimmer is a page dimmer + */ + dimmer(behavior: 'is page dimmer'): boolean; + /** + * Sets page dimmer to active + */ + dimmer(behavior: 'set active'): JQuery; + /** + * Sets an element as a dimmable section + */ + dimmer(behavior: 'set dimmable'): JQuery; + /** + * Sets a dimmable section as dimmed + */ + dimmer(behavior: 'set dimmed'): JQuery; + /** + * Sets current dimmer as a page dimmer + */ + dimmer(behavior: 'set page dimmer'): JQuery; + /** + * Sets a dimmer as disabled + */ + dimmer(behavior: 'set disabled'): JQuery; + dimmer(settings: SemanticUI.DimmerSettings): JQuery; + dimmer(): JQuery; + + // endregion + + // region Dropdown + + // TODO: Should 'value'/'values' parameters be of type 'string' instead of 'any'? + + /** + * Recreates dropdown menu from select option values. + */ + dropdown(behavior: 'setup menu'): JQuery; + /** + * Refreshes all cached selectors and data + */ + dropdown(behavior: 'refresh'): JQuery; + /** + * Toggles current visibility of dropdown + */ + dropdown(behavior: 'toggle'): JQuery; + /** + * Shows dropdown + */ + dropdown(behavior: 'show'): JQuery; + /** + * Hides dropdown + */ + dropdown(behavior: 'hide'): JQuery; + /** + * Clears dropdown of selection + */ + dropdown(behavior: 'clear'): JQuery; + /** + * Hides all other dropdowns that is not current dropdown + */ + dropdown(behavior: 'hide others'): JQuery; + /** + * Restores dropdown text and value to its value on page load + */ + dropdown(behavior: 'restore defaults'): JQuery; + /** + * Restores dropdown text to its value on page load + */ + dropdown(behavior: 'restore default text'): JQuery; + /** + * Restores dropdown text to its prompt, placeholder text + */ + dropdown(behavior: 'restore placeholder text'): JQuery; + /** + * Restores dropdown value to its value on page load + */ + dropdown(behavior: 'restore default value'): JQuery; + /** + * Saves current text and value as new defaults (for use with restore) + */ + dropdown(behavior: 'save defaults'): JQuery; + /** + * Sets value as selected + */ + dropdown(behavior: 'set selected', value: any): JQuery; + /** + * Remove value from selected + */ + dropdown(behavior: 'remove selected', value: any): JQuery; + /** + * Adds a group of values as selected + */ + dropdown(behavior: 'set selected', values: any[]): JQuery; + /** + * Sets selected values to exactly specified values, removing current selection + */ + dropdown(behavior: 'set exactly', values: any[]): JQuery; + /** + * Sets dropdown text to a value + */ + dropdown(behavior: 'set text', text: string): JQuery; + /** + * Sets dropdown input to value (does not update display state) + */ + dropdown(behavior: 'set value', value: any): JQuery; + /** + * Returns current dropdown text + */ + dropdown(behavior: 'get text'): string; + /** + * Returns current dropdown input value + */ + dropdown(behavior: 'get value'): any; + /** + * Returns DOM element that matches a given input value + */ + dropdown(behavior: 'get item', value: any): JQuery; + /** + * Adds touch events to element + */ + dropdown(behavior: 'bind touch events'): JQuery; + /** + * Adds mouse events to element + */ + dropdown(behavior: 'bind mouse events'): JQuery; + /** + * Binds a click to document to determine if you click away from a dropdown + */ + dropdown(behavior: 'bind intent'): JQuery; + /** + * Unbinds document intent click + */ + dropdown(behavior: 'unbind intent'): JQuery; + /** + * Returns whether event occurred inside dropdown + */ + dropdown(behavior: 'determine intent'): boolean; + /** + * Triggers preset item selection action based on settings passing text/value + */ + dropdown(behavior: 'determine select action', text: string, value: any): JQuery; + /** + * Sets dropdown to active state + */ + dropdown(behavior: 'set active'): JQuery; + /** + * Sets dropdown to visible state + */ + dropdown(behavior: 'set visible'): JQuery; + /** + * Removes dropdown active state + */ + dropdown(behavior: 'remove active'): JQuery; + /** + * Removes dropdown visible state + */ + dropdown(behavior: 'remove visible'): JQuery; + /** + * Returns whether dropdown is a selection dropdown + */ + dropdown(behavior: 'is selection'): boolean; + /** + * Returns whether dropdown is animated + */ + dropdown(behavior: 'is animated'): boolean; + /** + * Returns whether dropdown is visible + */ + dropdown(behavior: 'is visible'): boolean; + /** + * Returns whether dropdown is hidden + */ + dropdown(behavior: 'is hidden'): boolean; + /** + * Returns dropdown value as set on page load + */ + dropdown(behavior: 'get default text'): string; + /** + * Returns placeholder text + */ + dropdown(behavior: 'get placeholder text'): string; + dropdown(settings: SemanticUI.DropdownSettings): JQuery; + dropdown(): JQuery; + + // endregion + + // region Embed + + /** + * Changes iframe to a new content source + */ + embed(behavior: 'change', source: string, id: string, url: string): JQuery; + /** + * Removes embed and shows placeholder content if available + */ + embed(behavior: 'reset'): JQuery; + /** + * Shows embed content + */ + embed(behavior: 'show'): JQuery; + /** + * Hides embed content and shows placeholder content + */ + embed(behavior: 'hide'): JQuery; + /** + * Returns current content id + */ + embed(behavior: 'get id'): string; + /** + * Returns placeholder image url + */ + embed(behavior: 'get placeholder'): string; + /** + * Returns source name + */ + embed(behavior: 'get sources'): string; + /** + * Returns source type + */ + embed(behavior: 'get type'): string; + /** + * Returns URL with all parameters added + */ + embed(behavior: 'get url'): string; + /** + * Returns whether embed content has placeholder + */ + embed(behavior: 'has placeholder'): boolean; + /** + * Destroys instance and removes all events + */ + embed(behavior: 'destroy'): JQuery; + embed(settings: SemanticUI.EmbedSettings): JQuery; + embed(): JQuery; + + // endregion + + // region Modal + + /** + * Shows the modal + */ + modal(behavior: 'show'): JQuery; + /** + * Hides the modal + */ + modal(behavior: 'hide'): JQuery; + /** + * Toggles the modal + */ + modal(behavior: 'toggle'): JQuery; + /** + * Refreshes centering of modal on page + */ + modal(behavior: 'refresh'): JQuery; + /** + * Shows associated page dimmer + */ + modal(behavior: 'show dimmer'): JQuery; + /** + * Hides associated page dimmer + */ + modal(behavior: 'hide dimmer'): JQuery; + /** + * Hides all modals not selected modal in a dimmer + */ + modal(behavior: 'hide others'): JQuery; + /** + * Hides all visible modals in the same dimmer + */ + modal(behavior: 'hide all'): JQuery; + /** + * Caches current modal size + */ + modal(behavior: 'cache sizes'): JQuery; + /** + * Returns whether the modal can fit on the page + */ + modal(behavior: 'can fit'): boolean; + /** + * Returns whether the modal is active + */ + modal(behavior: 'is active'): boolean; + /** + * Sets modal to active + */ + modal(behavior: 'set active'): JQuery; + modal(behavior: 'attach events', selector: SemanticUI.Selector, event?: string): JQuery; + modal(behavior: 'setting', name: string, value: any): JQuery; + modal(settings: SemanticUI.ModalSettings): JQuery; + modal(): JQuery; + + // endregion + + // region Nag + + // TODO: Documentation is lacking. Is it possible to infer intended behaviors? + + nag(behavior: 'show'): JQuery; + /** + * Clears cookie so nag shows again + */ + nag(behavior: 'clear'): JQuery; + nag(settings: SemanticUI.NagSettings): JQuery; + + // endregion + + // region Popup + + /** + * Shows popup + */ + popup(behavior: 'show'): JQuery; + /** + * Hides popup + */ + popup(behavior: 'hide'): JQuery; + /** + * Hides all visible pop ups on the page + */ + popup(behavior: 'hide all'): JQuery; + /** + * Returns current popup dom element + */ + popup(behavior: 'get popup'): JQuery; + /** + * Changes current popup content + */ + popup(behavior: 'change content', html: string): JQuery; + /** + * Toggles visibility of popup + */ + popup(behavior: 'toggle'): JQuery; + /** + * Returns whether popup is visible + */ + popup(behavior: 'is visible'): boolean; + /** + * Returns whether popup is hidden + */ + popup(behavior: 'is hidden'): boolean; + /** + * Returns whether popup is created and inserted into the page + */ + popup(behavior: 'exists'): boolean; + /** + * Adjusts popup when content size changes (only necessary for centered popups) + */ + popup(behavior: 'reposition'): JQuery; + /** + * Repositions a popup + */ + popup(behavior: 'set position', position: string): JQuery; + /** + * Removes popup from the page and removes all events + */ + popup(behavior: 'destroy'): JQuery; + /** + * Removes popup from the page + */ + popup(behavior: 'remove popup'): JQuery; + popup(settings: SemanticUI.PopupSettings): JQuery; + popup(): JQuery; + + // endregion + + // region Progress + + /** + * Sets current percent of progress to value. If using a total will convert from percent to estimated value. + */ + progress(behavior: 'set percent', percent: number): JQuery; + /** + * Sets progress to specified value. Will automatically calculate percent from total. + */ + progress(behavior: 'set progress', value: number): JQuery; + /** + * Increments progress by increment value, if not passed a value will use random amount specified in settings + */ + progress(behavior: 'increment', incrementValue: number): JQuery; + /** + * Decrements progress by decrement value, if not passed a value will use random amount specified in settings + */ + progress(behavior: 'decrement', decrementValue: number): JQuery; + /** + * Immediately updates progress to value, ignoring progress animation interval delays + */ + progress(behavior: 'update progress', value: number): JQuery; + /** + * Finishes progress and sets loaded to 100% + */ + progress(behavior: 'complete'): JQuery; + /** + * Resets progress to zero + */ + progress(behavior: 'reset'): JQuery; + /** + * Set total to a new value + */ + progress(behavior: 'set total', total: number): JQuery; + /** + * Replaces templated string with value, total, percent left and percent. + */ + progress(behavior: 'get text', text: string): string; + /** + * Returns normalized value inside acceptable range specified by total. + */ + progress(behavior: 'get normalized value', value: number): number; + /** + * Returns percent as last specified + */ + progress(behavior: 'get percent'): number; + /** + * Returns current progress value + */ + progress(behavior: 'get value'): number; + /** + * Returns total + */ + progress(behavior: 'get total'): number; + /** + * Returns whether progress is completed + */ + progress(behavior: 'is complete'): boolean; + /** + * Returns whether progress was a success + */ + progress(behavior: 'is success'): boolean; + /** + * Returns whether progress is in warning state + */ + progress(behavior: 'is warning'): boolean; + /** + * Returns whether progress is in error state + */ + progress(behavior: 'is error'): boolean; + /** + * Returns whether progress is in active state + */ + progress(behavior: 'is active'): boolean; + /** + * Sets progress to active state + */ + progress(behavior: 'set active'): JQuery; + /** + * Sets progress to warning state + */ + progress(behavior: 'set warning'): JQuery; + /** + * Sets progress to success state + */ + progress(behavior: 'set success'): JQuery; + /** + * Sets progress to error state + */ + progress(behavior: 'set error'): JQuery; + /** + * Changes progress animation speed + */ + progress(behavior: 'set duration', value: number): JQuery; + /** + * Sets progress exterior label to text + */ + progress(behavior: 'set label', text: string): JQuery; + /** + * Sets progress bar label to text + */ + progress(behavior: 'set bar label', text: string): JQuery; + /** + * Removes progress to active state + */ + progress(behavior: 'remove active'): JQuery; + /** + * Removes progress to warning state + */ + progress(behavior: 'remove warning'): JQuery; + /** + * Removes progress to success state + */ + progress(behavior: 'remove success'): JQuery; + /** + * Removes progress to error state + */ + progress(behavior: 'remove error'): JQuery; + progress(settings: SemanticUI.ProgressSettings): JQuery; + progress(): JQuery; + + // endregion + + // region Rating + + /** + * Sets rating programmatically + */ + rating(behavior: 'set rating', rating: number): JQuery; + /** + * Gets current rating + */ + rating(behavior: 'get rating'): number; + /** + * Disables interactive rating mode + */ + rating(behavior: 'disable'): JQuery; + /** + * Enables interactive rating mode + */ + rating(behavior: 'enable'): JQuery; + /** + * Clears current rating + */ + rating(behavior: 'clear rating'): JQuery; + rating(settings: SemanticUI.RatingSettings): JQuery; + rating(): JQuery; + + // endregion + + // region Search + + /** + * Search for value currently set in search input + */ + search(behavior: 'query'): JQuery; + /** + * Displays message in search results with text, using template matching type + */ + search(behavior: 'display message', text: string, type: string): JQuery; + /** + * Cancels current remote search query + */ + search(behavior: 'cancel query'): JQuery; + /** + * Search local object for specified query and display results + */ + search(behavior: 'search local', query: string): JQuery; + /** + * Whether has minimum characters + */ + search(behavior: 'has minimum characters'): boolean; + /** + * Search remote endpoint for specified query and display results + */ + search(behavior: 'search remote', query: string): JQuery; + /** + * Search object for specified query and return results + */ + search(behavior: 'search object', query: string, object: any, searchFields: string[]): any; + /** + * Cancels current remote search request + */ + search(behavior: 'cancel query'): JQuery; + /** + * Whether search is currently focused + */ + search(behavior: 'is focused'): boolean; + /** + * Whether search results are visible + */ + search(behavior: 'is visible'): boolean; + /** + * Whether search results are empty + */ + search(behavior: 'is empty'): boolean; + /** + * Returns current search value + */ + search(behavior: 'get value'): any; + /** + * Returns JSON object matching searched title or id (see above) + */ + search(behavior: 'get result', value: any): any; + /** + * Sets search input to value + */ + search(behavior: 'set value', value: any): JQuery; + /** + * Reads cached results for query + */ + search(behavior: 'read cache', query: string): JQuery; + /** + * Clears value from cache, if no parameter passed clears all cache + */ + search(behavior: 'clear cache', query?: string): JQuery; + /** + * Writes cached results for query + */ + search(behavior: 'write cache', query: string): JQuery; + /** + * Adds HTML to results and displays + */ + search(behavior: 'add results', html: string): JQuery; + /** + * Shows results container + */ + search(behavior: 'show results'): JQuery; + /** + * Hides results container + */ + search(behavior: 'hide results'): JQuery; + /** + * Generates results using parser specified by settings.template + */ + search(behavior: 'generate results', response: any): JQuery; + /** + * Removes all events + */ + search(behavior: 'destroy'): JQuery; + search(settings: SemanticUI.SearchSettings): JQuery; + search(): JQuery; + + // endregion + + // region Shape + + /** + * Flips the shape upward + */ + shape(behavior: 'flip up'): JQuery; + /** + * Flips the shape downward + */ + shape(behavior: 'flip down'): JQuery; + /** + * Flips the shape right + */ + shape(behavior: 'flip right'): JQuery; + /** + * Flips the shape left + */ + shape(behavior: 'flip left'): JQuery; + /** + * Flips the shape over clock-wise + */ + shape(behavior: 'flip over'): JQuery; + /** + * Flips the shape over counter-clockwise + */ + shape(behavior: 'flip back'): JQuery; + /** + * Set the next side to a specific selector + */ + shape(behavior: 'set next side', selector: SemanticUI.Selector): JQuery; + /** + * Returns whether shape is currently animating + */ + shape(behavior: 'is animating'): boolean; + /** + * Removes all inline styles + */ + shape(behavior: 'reset'): JQuery; + /** + * Queues an animation until after current animation + */ + shape(behavior: 'queue', animation: string): JQuery; + /** + * Forces a reflow on element + */ + shape(behavior: 'repaint'): JQuery; + /** + * Set the next side to next sibling to active element + */ + shape(behavior: 'set default side'): JQuery; + /** + * Sets shape to the content size of the next side + */ + shape(behavior: 'set stage size'): JQuery; + /** + * Refreshes the selector cache for element sides + */ + shape(behavior: 'refresh'): JQuery; + /** + * Returns translation for next side staged below + */ + shape(behavior: 'get transform down'): SemanticUI.Translation; + /** + * Returns translation for next side staged left + */ + shape(behavior: 'get transform left'): SemanticUI.Translation; + /** + * Returns translation for next side staged right + */ + shape(behavior: 'get transform right'): SemanticUI.Translation; + /** + * Returns translation for next side staged up + */ + shape(behavior: 'get transform up'): SemanticUI.Translation; + /** + * Returns translation for next side staged down + */ + shape(behavior: 'get transform down'): SemanticUI.Translation; + shape(settings: SemanticUI.ShapeSettings): JQuery; + shape(): JQuery; + + // endregion + + // region Sidebar + + /** + * Attaches sidebar action to given selector. Default event if none specified is toggle + */ + sidebar(behavior: 'attach events', selector: string, event?: string): JQuery; + /** + * Shows sidebar + */ + sidebar(behavior: 'show'): JQuery; + /** + * Hides sidebar + */ + sidebar(behavior: 'hide'): JQuery; + /** + * Toggles visibility of sidebar + */ + sidebar(behavior: 'toggle'): JQuery; + /** + * Returns whether sidebar is visible + */ + sidebar(behavior: 'is visible'): boolean; + /** + * Returns whether sidebar is hidden + */ + sidebar(behavior: 'is hidden'): boolean; + /** + * Pushes page content to be visible alongside sidebar + */ + sidebar(behavior: 'push page'): JQuery; + /** + * Returns direction of current sidebar + */ + sidebar(behavior: 'get direction'): string; + /** + * Returns page content to original position + */ + sidebar(behavior: 'pull page'): JQuery; + /** + * Adds stylesheet to page head to trigger sidebar animations + */ + sidebar(behavior: 'add body CSS'): JQuery; + /** + * Removes any inline stylesheets for sidebar animation + */ + sidebar(behavior: 'remove body CSS'): JQuery; + /** + * Returns vendor prefixed transition end event + */ + sidebar(behavior: 'get transition event'): string; + sidebar(settings: SemanticUI.SidebarSettings): JQuery; + sidebar(): JQuery; + + // endregion + + // region Sticky + + /** + * recalculates offsets + */ + sticky(behavior: 'refresh'): JQuery; + sticky(settings: SemanticUI.StickySettings): JQuery; + sticky(): JQuery; + + // endregion + + // region Tab + + /** + * Attaches tab action to given selector. Default event if none specified is toggle + */ + tab(behavior: 'attach events', selector: string, event?: string): JQuery; + /** + * Changes tab to path + */ + tab(behavior: 'change tab', path: string): JQuery; + /** + * Sets current path to state + */ + tab(behavior: 'set state', path: string): JQuery; + /** + * Returns current path + */ + tab(behavior: 'get path'): string; + /** + * Returns whether tab exists + */ + tab(behavior: 'is tab'): boolean; + /** + * Returns cached HTML for path + */ + tab(behavior: 'cache read', path: string): string | false; + /** + * Sets cached HTML for path + */ + tab(behavior: 'cache add', path: string, html: string): JQuery; + /** + * Removes cached HTML for path + */ + tab(behavior: 'cache remove', path: string): JQuery; + tab(settings: SemanticUI.TabSettings): JQuery; + tab(): JQuery; + + // endregion + + // region Transition + + /** + * Stop current animation and preserve queue + */ + transition(behavior: 'stop'): JQuery; + /** + * Stop current animation and queued animations + */ + transition(behavior: 'stop all'): JQuery; + /** + * Clears all queued animations + */ + transition(behavior: 'clear queue'): JQuery; + /** + * Stop current animation and show element + */ + transition(behavior: 'show'): JQuery; + /** + * Stop current animation and hide element + */ + transition(behavior: 'hide'): JQuery; + /** + * Toggles between hide and show + */ + transition(behavior: 'toggle'): JQuery; + /** + * Forces reflow using a more expensive but stable method + */ + transition(behavior: 'force repaint'): JQuery; + /** + * Triggers reflow on element + */ + transition(behavior: 'repaint'): JQuery; + /** + * Resets all conditions changes during transition + */ + transition(behavior: 'reset'): JQuery; + /** + * Enables animation looping + */ + transition(behavior: 'looping'): JQuery; + /** + * Removes looping state from element + */ + transition(behavior: 'remove looping'): JQuery; + /** + * Adds disabled state (stops ability to animate) + */ + transition(behavior: 'disable'): JQuery; + /** + * Removes disabled state + */ + transition(behavior: 'enable'): JQuery; + /** + * Modifies element animation duration + */ + transition(behavior: 'set duration', duration: number): JQuery; + /** + * Saves all class names and styles to cache to be retrieved after animation + */ + transition(behavior: 'save conditions'): JQuery; + /** + * Adds back cached names and styles to element + */ + transition(behavior: 'restore conditions'): JQuery; + /** + * Returns vendor prefixed animation property for animationname + */ + transition(behavior: 'get animation name'): string; + /** + * Returns vendor prefixed animation property for animationend + */ + transition(behavior: 'get animation event'): string; + /** + * Returns whether element is currently visible + */ + transition(behavior: 'is visible'): boolean; + /** + * Returns whether transition is currently occurring + */ + transition(behavior: 'is animating'): boolean; + /** + * Returns whether animation looping is set + */ + transition(behavior: 'is looping'): boolean; + /** + * Returns whether animations are supported + */ + transition(behavior: 'is supported'): boolean; + transition(transition: string): JQuery; + transition(settings: SemanticUI.TransitionSettings): JQuery; + transition(): JQuery; + + // endregion + + // endregion + + // region Behaviors + + // region API + + /** + * Execute query using existing API settings + */ + api(behavior: 'query'): JQuery; + /** + * Adds data to existing templated url and returns full url string + */ + api(behavior: 'add url data', url: string, data: any): string; + /** + * Gets promise for current API request + */ + api(behavior: 'get request'): JQueryDeferred | false; + /** + * Aborts current API request + */ + api(behavior: 'abort'): JQuery; + /** + * Removes loading and error state from element + */ + api(behavior: 'reset'): JQuery; + /** + * Returns whether last request was cancelled + */ + api(behavior: 'was cancelled'): boolean; + /** + * Returns whether last request was failure + */ + api(behavior: 'was failure'): boolean; + /** + * Returns whether last request was successful + */ + api(behavior: 'was successful'): boolean; + /** + * Returns whether last request was completed + */ + api(behavior: 'was complete'): boolean; + /** + * Returns whether element is disabled + */ + api(behavior: 'is disabled'): boolean; + /** + * Returns whether element response is mocked + */ + api(behavior: 'is mocked'): boolean; + /** + * Returns whether element is loading + */ + api(behavior: 'is loading'): boolean; + /** + * Sets loading state to element + */ + api(behavior: 'set loading'): JQuery; + /** + * Sets error state to element + */ + api(behavior: 'set error'): JQuery; + /** + * Removes loading state to element + */ + api(behavior: 'remove loading'): JQuery; + /** + * Removes error state to element + */ + api(behavior: 'remove error'): JQuery; + /** + * Gets event that API request will occur on + */ + api(behavior: 'get event'): string; + /** + * Returns encodeURIComponent value only if value passed is not already encoded + */ + api(behavior: 'get url encoded value', value: any): string; + /** + * Reads a locally cached response for a URL + */ + api(behavior: 'read cached response', url: string): any; + /** + * Writes a cached response for a URL + */ + api(behavior: 'write cached response', url: string, response: any): JQuery; + /** + * Creates new cache, removing all locally cached URLs + */ + api(behavior: 'create cache'): JQuery; + /** + * Removes API settings from the page and all events + */ + api(behavior: 'destroy'): JQuery; + api(settings: SemanticUI.ApiSettings): JQuery; + api(): JQuery; + + // endregion + + // region Form Validation + + /** + * Submits selected form + */ + form(behavior: 'submit'): JQuery; + /** + * Returns true/false whether a form passes its validation rules + */ + form(behavior: 'is valid'): boolean; + /** + * Validates form and calls onSuccess or onFailure + */ + form(behavior: 'validate form'): JQuery; + /** + * gets browser property change event + */ + form(behavior: 'get change event'): string; + /** + * Returns element with matching name, id, or data-validate metadata to ID + */ + form(behavior: 'get field', id: string): JQuery; + /** + * Returns value of element with id + */ + form(behavior: 'get value', id: string): any; + /** + * Returns object of element values that match array of ids. If no IDS are passed will return all fields + */ + form(behavior: 'get values', ids?: string[]): any; + /** + * Sets value of element with id + */ + form(behavior: 'set value', id: string): JQuery; + /** + * Sets key/value pairs from passed values object to matching ids + */ + form(behavior: 'set values', values: any): JQuery; + /** + * Returns validation rules for a given jQuery-referenced input field + */ + form(behavior: 'get validation', element: JQuery): any; + /** + * Returns whether a field exists + */ + form(behavior: 'has field', identifier: string): boolean; + /** + * Adds errors to form, given an array errors + */ + form(behavior: 'add errors', errors: string[]): JQuery; + form(settings: SemanticUI.FormSettings): JQuery; + form(): JQuery; + + // endregion + + // region Visibility + + /** + * Disable callbacks temporarily. This is useful if you need to adjust scroll position and do not want to trigger callbacks during the position change. + */ + visibility(behavior: 'disable callbacks'): JQuery; + /** + * Re-enable callbacks + */ + visibility(behavior: 'enable callbacks'): JQuery; + /** + * Returns whether element is on screen + */ + visibility(behavior: 'is on screen'): boolean; + /** + * Returns whether element is off screen + */ + visibility(behavior: 'is off screen'): boolean; + /** + * Returns number of pixels passed in current element from top of element + */ + visibility(behavior: 'get pixels passed'): number; + /** + * Returns element calculations as object + */ + visibility(behavior: 'get element calculations'): SemanticUI.ElementCalculations; + /** + * Returns screen calculations as object + */ + visibility(behavior: 'get screen calculations'): SemanticUI.ScreenCalculations; + /** + * Returns screen size as object + */ + visibility(behavior: 'get screen size'): SemanticUI.ScreenSize; + visibility(settings: SemanticUI.VisibilitySettings): JQuery; + visibility(): JQuery; + + // endregion + + // endregion +} + +declare namespace SemanticUI { + type Selector = string | JQuery; + + /** + * These settings are native to all modules, and define how the component ties content to DOM attributes, and debugging settings for the module. + */ + interface ComponentSettings { + // region DOM Settings + + /** + * Event namespace. Makes sure module teardown does not effect other events attached to an element. + */ + namespace?: string; + + // endregion + + // region Debug Settings + + /** + * Name used in log statements + */ + name?: string; + /** + * Silences all console output including error messages, regardless of other debug settings. + */ + silent?: boolean; + /** + * Debug output to console + */ + debug?: boolean; + /** + * Show console.table output with performance metrics + */ + performance?: boolean; + /** + * Debug output includes all internal behaviors + */ + verbose?: boolean; + + // endregion + } + + // region Modules + + // region Accordion + + /** + * @see {@link http://semantic-ui.com/modules/accordion.html#/settings} + */ + interface AccordionSettings extends ComponentSettings { + // region Behavior + + /** + * Only allow one section open at a time + * + * @default true + */ + exclusive?: boolean; + /** + * Event on title that will cause accordion to open + * + * @default 'click' + */ + on?: string; + /** + * Whether child content opacity should be animated (may cause performance issues with many child elements) + * + * @default true + */ + animateChildren?: boolean; + /** + * Close open nested accordion content when an element closes + * + * @default true + */ + closeNested?: boolean; + /** + * Allow active sections to collapse + * + * @default true + */ + collapsible?: boolean; + /** + * Duration in ms of opening animation + * + * @default 500 + */ + duration?: number; + /** + * Easing of opening animation. EaseInOutQuint is included with accordion, for additional options you must include easing equations. + * + * @default 'easeInOutQuint' + * @see {@link http://gsgd.co.uk/sandbox/jquery/easing/} + */ + easing?: string; + // TODO: Undocumented but probably intended to be public? + // observeChanges?: boolean; + + // endregion + + // region Callbacks + + /** + * Callback before element opens + */ + onOpening?: (this: JQuery) => void; + /** + * Callback after element is open + */ + onOpen?: (this: JQuery) => void; + /** + * Callback before element closes + */ + onClosing?: (this: JQuery) => void; + /** + * Callback after element is closed + */ + onClose?: (this: JQuery) => void; + /** + * Callback on element open or close + */ + onChange?: (this: JQuery) => void; + + // endregion + + // region DOM Settings + + /** + * Selectors used to find parts of a module + */ + selector?: { + /** + * @default '.accordion' + */ + accordion?: string; + /** + * @default '.title' + */ + title?: string; + /** + * @default '.title' + */ + trigger?: string; + /** + * @default '.content' + */ + content?: string; + }; + /** + * Class names used to determine element state + */ + className?: { + /** + * @default 'active' + */ + active?: string; + /** + * @default 'animating' + */ + animating?: string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default 'The method you called is not defined.' + */ + method?: string; + }; + + // endregion + } + + // endregion + + // region Checkbox + + /** + * @see {@link http://semantic-ui.com/modules/checkbox.html#/settings} + */ + interface CheckboxSettings extends ComponentSettings { + // region Behavior + + /** + * Setting to true/false will determine whether an input will allow no selection. Auto will set disallow this behavior only for radio boxes + * + * @default 'auto' + */ + uncheckable?: 'auto' | boolean; + /** + * Whether callbacks for checked status should be fired on init as well as change + * + * @default false + */ + fireOnInit?: boolean; + + // endregion + + // region Callbacks + + /** + * Callback after a checkbox is either checked or unchecked. + */ + onChange?: (this: HTMLElement) => void; + /** + * Callback after a checkbox is checked. + */ + onChecked?: (this: HTMLElement) => void; + /** + * Callback after a checkbox is set to undeterminate. + */ + onIndeterminate?: (this: HTMLElement) => void; + /** + * Callback after a checkbox is set to determinate. + */ + onDeterminate?: (this: HTMLElement) => void; + /** + * Callback after a checkbox is unchecked. + */ + onUnchecked?: (this: HTMLElement) => void; + /** + * Callback before a checkbox is checked. Can cancel change by returning false + */ + beforeChecked?: (this: HTMLElement) => boolean; + /** + * Callback before a checkbox is set to undeterminate. Can cancel change by returning false + */ + beforeIndeterminate?: (this: HTMLElement) => boolean; + /** + * Callback before a checkbox is set to determinate. Can cancel change by returning false + */ + beforeDeterminate?: (this: HTMLElement) => boolean; + /** + * Callback before a checkbox is unchecked. Can cancel change by returning false + */ + beforeUnchecked?: (this: HTMLElement) => boolean; + /** + * Callback after a checkbox is enabled. + */ + onEnable?: (this: HTMLElement) => void; + /** + * Callback after a checkbox is disabled. + */ + onDisable?: (this: HTMLElement) => void; + /** + * Callback after a checkbox is enabled. + * + * @deprecated + */ + onEnabled?: (this: HTMLElement) => void; + /** + * Callback after a checkbox is disabled. + * + * @deprecated + */ + onDisabled?: (this: HTMLElement) => void; + + // endregion + + // region DOM Settings + + /** + * Selectors used to find parts of a module + */ + selector?: { + /** + * @default 'input[type=checkbox], input[type=radio]' + */ + input?: string; + /** + * @default 'label' + */ + label?: string; + }; + /** + * Class names used to determine element state + */ + className?: { + /** + * @default 'checked' + */ + checked?: string; + /** + * @default 'disabled' + */ + disabled?: string; + /** + * @default 'radio' + */ + radio?: string; + /** + * @default 'read-only' + */ + readOnly?: string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default 'The method you called is not defined.' + */ + method?: string; + }; + + // endregion + } + + // endregion + + // region Dimmer + + /** + * @see {@link http://semantic-ui.com/modules/dimmer.html#/settings} + */ + interface DimmerSettings extends ComponentSettings { + // region Behavior + + /** + * Dimmers opacity from 0-1. Defaults to auto which uses the CSS specified opacity. + * + * @default 'auto' + */ + opacity?: 'auto' | number; + /** + * Specify a variation to add when generating dimmer, like inverted + * + * @default false + */ + variation?: false | string; + /** + * If initializing a dimmer on a dimmable context, you can use dimmerName to distinguish between multiple dimmers in that context. + * + * @default false + */ + dimmerName?: false | string; + /** + * Whether clicking on the dimmer should hide the dimmer (Defaults to auto, closable only when settings.on is not hover + * + * @default 'auto' + */ + closable?: 'auto' | boolean; + /** + * Can be set to hover or click to show/hide dimmer on dimmable event + * + * @default false + */ + on?: false | 'hover' | 'click'; + /** + * Whether to dim dimmers using CSS transitions. + * + * @default true + */ + useCSS?: boolean; + /** + * Animation duration of dimming. If an integer is used, that value will apply to both show and hide animations. + */ + duration?: number | { + /** + * @default 500 + */ + show?: number; + /** + * @default 500 + */ + hide?: number; + }; + /** + * Named transition to use when animating menu in and out. Fade and slide down are available without including ui transitions + * + * @default 'fade' + * @see {@link http://semantic-ui.com/modules/transition.html} + */ + transition?: string; + + // endregion + + // region Callbacks + + /** + * Callback on element show + */ + onShow?: (this: JQuery) => void; + /** + * Callback on element hide + */ + onHide?: (this: JQuery) => void; + /** + * Callback on element show or hide + */ + onchange?: (this: JQuery) => void; + + // endregion + + // region DOM Settings + + /** + * Object containing selectors used by module. + */ + selector?: { + /** + * @default '.dimmable' + */ + dimmable?: string; + /** + * @default '.ui.dimmer' + */ + dimmer?: string; + /** + * @default '.ui.dimmer > .content, .ui.dimmer > .content > .center' + */ + content?: string; + }; + /** + * Templates used to generate dimmer content + */ + template?: { + dimmer?: () => JQuery; + }; + /** + * Class names used to attach style to state + */ + className?: { + /** + * @default 'active' + */ + active?: string; + /** + * @default 'dimmable' + */ + dimmable?: string; + /** + * @default 'dimmed' + */ + dimmed?: string; + /** + * @default 'disabled' + */ + disabled?: string; + /** + * @default 'page' + */ + pageDimmer?: string; + /** + * @default 'hide' + */ + hide?: string; + /** + * @default 'show' + */ + show?: string; + /** + * @default 'transition' + */ + transition?: string; + }; + + // endregion + + // region Debug Settings + + /** + * Error messages displayed to console + */ + error?: { + /** + * @default 'The method you called is not defined.' + */ + method?: string; + }; + + // endregion + } + + // endregion + + // region Dropdown + + /** + * @see {@link http://semantic-ui.com/modules/dropdown.html#/settings} + */ + interface DropdownSettings extends ComponentSettings { + // TODO: Should 'value'/'values' parameters be of type 'string' instead of 'any'? + + // region Frequently Used Settings + + /** + * Event used to trigger dropdown (Hover, Click, Custom Event) + * + * @default 'click' + */ + on?: string; + /** + * When set to true will fire onChange even when the value a user select matches the currently selected value. + * + * @default false + */ + allowReselection?: boolean; + /** + * Whether search selection should allow users to add their own selections, works for single or multi-select. + * + * @default false + */ + allowAdditions?: boolean; + /** + * When disabled user additions will appear in the results menu using a specially formatted selection item formatted by templates.addition. + * + * @default true + */ + hideAdditions?: boolean; + /** + * Sets a default action to occur. (See usage guide) + * + * @default 'activate' + * @see {@link http://semantic-ui.com/modules/dropdown.html#/usage} + */ + action?: 'activate' | 'select' | 'combo' | 'nothing' | 'hide' | ((this: JQuery, text: string, value: string | false, element: JQuery) => void); + /** + * The minimum characters for a search to begin showing results + * + * @default 1 + */ + minCharacters?: number; + /** + * When using search selection specifies how to match values. + * + * @default 'both' + */ + match?: 'both' | 'value' | 'text'; + /** + * Whether dropdown should select new option when using keyboard shortcuts. Setting to false will require enter or left click to confirm a choice. + * + * @default true + */ + selectOnKeydown?: boolean; + /** + * Whether search selection will force currently selected choice when element is blurred. + * + * @default true + */ + forceSelection?: boolean; + /** + * Whether menu items with sub-menus (categories) should be selectable + * + * @default false + */ + allowCategorySelection?: boolean; + /** + * @default 'auto' + */ + placeholder?: 'auto' | 'value' | false; + + // endregion + + // region Remote Settings + + /** + * Can be set to an object to specify API settings for retrieving remote selection menu content from an API endpoint + * + * @default false + * @see {@link http://semantic-ui.com/behaviors/api.html} + */ + apiSettings?: false | ApiSettings; + /** + * List mapping dropdown content to JSON Property when using API + */ + fields?: { + /** + * grouping for api results + * + * @default 'results' + */ + remoteValues?: string; + /** + * grouping for all dropdown values + * + * @default 'values' + */ + values?: string; + /** + * displayed dropdown text + * + * @default 'name' + */ + name?: string; + /** + * actual dropdown value + * + * @default 'value' + */ + value?: string; + }; + /** + * When enabled will automatically store selected name/value pairs in sessionStorage to preserve user selection on page refresh. Disabling will clear remote dropdown values on refresh. + * + * @default true + */ + saveRemoteData?: boolean; + + // endregion + + // region Multiple Select Settings + + /** + * Whether multiselect should use labels. Must be set to true when allowAdditions is true + * + * @default true + */ + useLabels?: boolean; + /** + * When set to a number, sets the maximum number of selections + * + * @default false + */ + maxSelections?: boolean; + /** + * Maximum glyph width, used to calculate search size. This is usually size of a "W" in your font in em + * + * @default 1.0714 + */ + glyphWidth?: number; + /** + * Allows customization of multi-select labels + */ + label?: { + /** + * @default 'horizontal flip' + */ + transition?: string; + /** + * @default 200 + */ + duration?: number; + /** + * @default false + */ + variation?: false | string; + }; + + // endregion + + // region Additional Settings + + /** + * When set to auto determines direction based on whether dropdown can fit on screen. Set to upward or downward to always force a direction. + * + * @default 'auto' + */ + direction?: 'auto' | 'upward' | 'downward'; + /** + * Whether dropdown should try to keep itself on screen by checking whether menus display position in its context (Default context is page). + * + * @default true + */ + keepOnScreen?: boolean; + /** + * Element context to use when checking whether can show when keepOnScreen: true + * + * @default 'window' + */ + context?: Selector; + /** + * Specifying to "true" will use a fuzzy full text search, setting to "exact" will force the exact search to be matched somewhere in the string + * + * @default false + */ + fullTextSearch?: boolean | 'exact'; + /** + * Whether HTML included in dropdown values should be preserved. (Allows icons to show up in selected value) + * + * @default true + */ + preserveHTML?: boolean; + /** + * Whether to sort values when creating a dropdown automatically from a select element. + * + * @default false + */ + sortSelect?: boolean; + /** + * Whether to show dropdown menu automatically on element focus. + * + * @default true + */ + showOnFocus?: boolean; + /** + * Whether to allow the element to be navigable by keyboard, by automatically creating a tabindex + * + * @default true + */ + allowTab?: boolean; + /** + * Named transition to use when animating menu in and out. Defaults to slide down or slide up depending on dropdown direction. Fade and slide down are available without including ui transitions + * + * @default 'auto' + * @see {@link http://semantic-ui.com/modules/transition.html} + */ + transition?: 'auto' | string; + /** + * Duration of animation events + * + * @default 200 + */ + duration?: number; + /** + * The keycode used to represent keyboard shortcuts. To avoid issues with some foreign languages, you can pass false for comma delimiter's value + */ + keys?: { + /** + * @default 8 + */ + backspace?: number; + /** + * @default 188 + */ + delimiter?: number | false; + /** + * @default 46 + */ + deleteKey?: number; + /** + * @default 13 + */ + enter?: number; + /** + * @default 27 + */ + escape?: number; + /** + * @default 33 + */ + pageUp?: number; + /** + * @default 34 + */ + pageDown?: number; + /** + * @default 37 + */ + leftArrow?: number; + /** + * @default 38 + */ + upArrow?: number; + /** + * @default 39 + */ + rightArrow?: number; + /** + * @default 40 + */ + downArrow?: number; + }; + /** + * Time in milliseconds to debounce show or hide behavior when on: hover is used, or when touch is used. + */ + delay?: { + /** + * @default 300 + */ + hide?: number; + /** + * @default 200 + */ + show?: number; + /** + * @default 50 + */ + search?: number; + /** + * @default 50 + */ + touch?: number; + }; + + // endregion + + // region Callbacks + + /** + * Is called after a dropdown value changes. Receives the name and value of selection and the active menu element + */ + onChange?: (this: JQuery, value: any, text: string, $choice: JQuery) => void; + /** + * Is called after a dropdown selection is added using a multiple select dropdown, only receives the added value + */ + onAdd?: (this: JQuery, addedValue: any, addedText: string, $addedChoice: JQuery) => void; + /** + * Is called after a dropdown selection is removed using a multiple select dropdown, only receives the removed value + */ + onRemove?: (this: JQuery, removedValue: any, removedText: string, $removedChoice: JQuery) => void; + /** + * Allows you to modify a label before it is added. Expects the jQ DOM element for a label to be returned. + */ + onLabelCreate?: (this: JQuery, value: any, text: string) => JQuery; + /** + * Called when a label is remove, return false; will prevent the label from being removed. + */ + onLabelRemove?: (this: JQuery, value: any) => false | void; + /** + * Is called after a label is selected by a user + */ + onLabelSelect?: (this: JQuery, $selectedLabels: JQuery) => void; + /** + * Is called after a dropdown is searched with no matching values + */ + onNoResults?: (this: JQuery, searchValue: any) => void; + /** + * Is called before a dropdown is shown. If false is returned, dropdown will not be shown. + */ + onShow?: (this: JQuery) => false | void; + /** + * Is called before a dropdown is hidden. If false is returned, dropdown will not be hidden. + */ + onHide?: (this: JQuery) => false | void; + + // endregion + + // region DOM Settings + + /** + * You can specify site wide messages by modifying $.fn.dropdown.settings.message that will apply on any dropdown if it appears in the page. + */ + message?: { + /** + * @default 'Add {term}' + */ + addResult?: string; + /** + * @default '{count} selected' + */ + count?: string; + /** + * @default 'Max {maxCount} selections' + */ + maxSelections?: string; + /** + * 'No results found.' + */ + noResults?: string; + }; + selector?: { + /** + * @default '.addition' + */ + addition?: string; + /** + * @default '.ui.dropdown' + */ + dropdown?: string; + /** + * @default '> .dropdown.icon' + */ + icon?: string; + /** + * @default '> input[type="hidden"], > select' + */ + input?: string; + /** + * @default '.item' + */ + item?: string; + /** + * @default '> .label' + */ + label?: string; + /** + * @default '> .label > .delete.icon' + */ + remove?: string; + /** + * @default '.label' + */ + siblingLabel?: string; + /** + * @default '.menu' + */ + menu?: string; + /** + * @default '.message' + */ + message?: string; + /** + * @default '.dropdown.icon' + */ + menuIcon?: string; + /** + * @default 'input.search, .menu > .search > input' + */ + search?: string; + /** + * @default '> .text:not(.icon)' + */ + text?: string; + }; + regExp?: { + /** + * @default /[-[\]{}()*+?.,\\^$|#\s]/g + */ + escape?: RegExp; + }; + metadata?: { + /** + * @default 'defaultText' + */ + defaultText?: string; + /** + * @default 'defaultValue' + */ + defaultValue?: string; + /** + * @default 'placeholderText' + */ + placeholderText?: string; + /** + * @default 'text' + */ + text?: string; + /** + * @default 'value' + */ + value?: string; + }; + className?: { + /** + * @default 'active' + */ + active?: string; + /** + * @default 'addition' + */ + addition?: string; + /** + * @default 'animating' + */ + animating?: string; + /** + * @default 'disabled' + */ + disabled?: string; + /** + * @default 'ui dropdown' + */ + dropdown?: string; + /** + * @default 'filtered' + */ + filtered?: string; + /** + * @default 'hidden transition' + */ + hidden?: string; + /** + * @default 'item' + */ + item?: string; + /** + * @default 'ui label' + */ + label?: string; + /** + * @default 'loading' + */ + loading?: string; + /** + * @default 'menu' + */ + menu?: string; + /** + * @default 'message' + */ + message?: string; + /** + * @default 'multiple' + */ + multiple?: string; + /** + * @default 'default' + */ + placeholder?: string; + /** + * @default 'search' + */ + search?: string; + /** + * @default 'selected' + */ + selected?: string; + /** + * @default 'selection' + */ + selection?: string; + /** + * @default 'upward' + */ + upward?: string; + /** + * @default 'visible' + */ + visible?: string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default 'You called a dropdown action that was not defined' + */ + action?: string; + /** + * @default 'Once a select has been initialized behaviors must be called on the created ui dropdown' + */ + alreadySetup?: string; + /** + * @default 'Allowing user additions currently requires the use of labels.' + */ + labels?: string; + /** + * @default 'The method you called is not defined.' + */ + method?: string; + /** + * @default 'This module requires ui transitions ' + */ + noTransition?: string; + }; + + // endregion + } + + // endregion + + // region Embed + + /** + * @see {@link http://semantic-ui.com/modules/embed.html#/settings} + */ + interface EmbedSettings extends ComponentSettings { + /** + * Specifies a url to use for embed + * + * @default false + */ + url?: false | string; + + // region Embed Settings + + /** + * Specifies an icon to use with placeholder content + * + * @default false + */ + icon?: false | string; + /** + * Specifies a source to use, if no source is provided it will be determined from the domain of a specified url. + * + * @default false + */ + source?: false | string; + /** + * Specifies an id value to replace with the {id} value found in templated urls + * + * @default false + */ + id?: false | string; + /** + * Specify an object containing key/value pairs to add to the iframes GET parameters + * + * @default false + */ + parameters?: false | any; + + // endregion + + // region Video Settings + + /** + * Default setting auto will only autoplay content when a placeholder is specified. Setting to true or false will force autoplay. + * + * @default 'auto' + */ + autoplay?: 'auto' | boolean; + /** + * Specifies a default chrome color with Vimeo or YouTube. + * + * @default '#444444' + */ + color?: string; + /** + * Whether to prefer HD content + * + * @default true + */ + hd?: boolean; + /** + * Whether to show networks branded UI like title cards, or after video calls to action. + * + * @default false + */ + brandedUI?: boolean; + + // endregion + + // region Callbacks + + /** + * Callback when iframe is generated + */ + onCreate?: (this: JQuery, url: string) => void; + /** + * Whenever an iframe contents is shown + */ + onDisplay?: (this: JQuery) => void; + /** + * Callback immediately before Embed is removed from DOM + */ + onPlaceholderDisplay?: (this: JQuery) => void; + /** + * Callback when module parameters are determined. Allows you to adjust parameters at run time by returning a new parameters object. + */ + onEmbed?: (this: JQuery, parameters: any) => any; + + // endregion + + // region DOM Settings + + /** + * DOM Selectors used internally + */ + selector?: { + /** + * @default '.embed' + */ + embed?: string; + /** + * @default '.placeholder' + */ + placeholder?: string; + /** + * @default '.play' + */ + play?: string; + }; + /** + * HTML Data attributes used to store data + */ + metadata?: { + /** + * @default 'id' + */ + id?: string; + /** + * @default 'icon' + */ + icon?: string; + /** + * @default 'placeholder' + */ + placeholder?: string; + /** + * @default 'source' + */ + source?: string; + /** + * @default 'url' + */ + url?: string; + }; + /** + * Class names used to attach style to state + */ + className?: { + /** + * @default 'active' + */ + active?: string; + /** + * @default 'embed' + */ + embed?: string; + }; + templates?: { + /** + * returns html for iframe + */ + iframe?: (url: string, parameters: string) => string; + /** + * returns html for placeholder element + */ + placeholder?: (image: string, icon: string) => string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default 'No URL specified' + */ + noURL?: string; + /** + * @default 'The method you called is not defined' + */ + method?: string; + }; + + // endregion + } + + // endregion + + // region Modal + + /** + * @see {@link http://semantic-ui.com/modules/modal.html#/settings} + */ + interface ModalSettings extends ComponentSettings { + // region Modal Settings + + /** + * If set to false will prevent the modal from being moved to inside the dimmer + * + * @default true + */ + detachable?: boolean; + /** + * When true, the first form input inside the modal will receive focus when shown. Set this to false to prevent this behavior. + * + * @default true + */ + autofocus?: boolean; + /** + * Whether any change in modal DOM should automatically refresh cached positions + * + * @default false + */ + observeChanges?: boolean; + /** + * If set to true will not close other visible modals when opening a new one + * + * @default false + */ + allowMultiple?: boolean; + /** + * Whether to automatically bind keyboard shortcuts + * + * @default true + */ + keyboardShortcuts?: boolean; + /** + * A vertical offset to allow for content outside of modal, for example a close button, to be centered. + * + * @default 0 + */ + offset?: number; + /** + * Selector or jquery object specifying the area to dim + * + * @default 'body' + */ + context?: Selector; + /** + * Setting to false will not allow you to close the modal by clicking on the dimmer + * + * @default true + */ + closable?: boolean; + /** + * You can specify custom settings to extend UI dimmer + * + * @see {@link http://semantic-ui.com/modules/dimmer.html} + */ + dimmerSettings?: DimmerSettings; + /** + * Named transition to use when animating menu in and out, full list can be found in ui transitions docs. + * + * @default 'scale' + * @see {@link http://semantic-ui.com/modules/transition.html} + */ + transition?: string; + /** + * Duration of animation + * + * @default 400 + */ + duration?: number; + /** + * Whether additional animations should queue + * + * @default false + */ + queue?: boolean; + + // endregion + + // region Callbacks + + /** + * Is called when a modal starts to show. + */ + onShow?: (this: JQuery) => void; + /** + * Is called after a modal has finished showing animating. + */ + onVisible?: (this: JQuery) => void; + /** + * Is called after a modal starts to hide. If the function returns false, the modal will not hide. + */ + onHide?: (this: JQuery, $element: JQuery) => false | void; + /** + * Is called after a modal has finished hiding animation. + */ + onHidden?: (this: JQuery) => void; + /** + * Is called after a positive, approve or ok button is pressed. If the function returns false, the modal will not hide. + */ + onApprove?: (this: JQuery, $element: JQuery) => false | void; + /** + * Is called after a negative, deny or cancel button is pressed. If the function returns false the modal will not hide. + */ + onDeny?: (this: JQuery, $element: JQuery) => false | void; + + // endregion + + // region DOM Settings + + selector?: { + /** + * @default '.close, .actions .button' + */ + close?: string; + /** + * @default '.actions .positive, .actions .approve, .actions .ok' + */ + approve?: string; + /** + * @default '.actions .negative, .actions .deny, .actions .cancel' + */ + deny?: string; + }; + className?: { + /** + * @default 'active' + */ + active?: string; + /** + * @default 'scrolling' + */ + scrolling?: string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default 'The method you called is not defined.' + */ + method?: string; + }; + + // endregion + } + + // endregion + + // region Nag + + /** + * @see {@link http://semantic-ui.com/modules/nag.html} + */ + interface NagSettings extends ComponentSettings { + // region Behavior + + /** + * allows cookie to be overridden + * + * @default false + */ + persist?: boolean; + /** + * set to zero to require manually dismissal, otherwise hides on its own + * + * @default 0 + */ + displayTime?: number; + animation?: { + /** + * @default 'slide' + */ + show?: string; + /** + * @default 'slide' + */ + hide?: string; + }; + /** + * @default false + */ + context?: false | Selector; + /** + * @default false + */ + detachable?: boolean; + + /** + * @default 30 + */ + expires?: number; + /** + * @default false + */ + domain?: false | string; + /** + * @default '/' + */ + path?: string; + + /** + * type of storage to use + * + * @default 'cookie' + */ + storageMethod?: 'cookie' | 'localstorage' | 'sessionstorage'; + + /** + * @default 'nag' + */ + key?: any; + /** + * @default 'dismiss' + */ + value?: any; + + /** + * @default 500 + */ + speed?: number; + /** + * @default 'easeOutQuad' + */ + easing?: string; + + // endregion + + // region Callbacks + + onHide?: (this: JQuery) => void; + + // endregion + + // region DOM Settings + + className?: { + /** + * @default 'bottom' + */ + bottom?: string; + /** + * @default 'fixed' + */ + fixed?: string; + }; + selector?: { + /** + * @default '.close.icon' + */ + close?: string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default '$.cookie is not included. A storage solution is required.' + */ + noCookieStorage?: string; + /** + * @default 'Neither $.cookie or store is defined. A storage solution is required for storing state' + */ + noStorage?: string; + /** + * @default 'The method you called is not defined.' + */ + method?: string; + }; + + // endregion + } + + // endregion + + // region Popup + + /** + * @see {@link http://semantic-ui.com/modules/popup.html#/settings} + */ + interface PopupSettings extends ComponentSettings { + // region Popup Settings + + /** + * Can specify a DOM element that should be used as the popup. This is useful for including a pre-formatted popup. + * + * @default false + */ + popup?: false | Selector; + /** + * Whether all other popups should be hidden when this popup is opened + * + * @default false + */ + exclusive?: boolean; + /** + * Whether to move popup to same offset container as target element when popup already exists on the page. + * Using a popup inside of an element without overflow:visible, like a sidebar, may require you to set this to false + * + * @default true + */ + movePopup?: boolean; + /** + * Whether popup should attach mutationObservers to automatically run destroy when the element is removed from the page's DOM. + * + * @default true + */ + observeChanges?: boolean; + /** + * When the popup surpasses the boundary of this element, it will attempt to find another display position. + */ + boundary?: Selector; + /** + * Selector or jquery object specifying where the popup should be created. + * + * @default 'body' + */ + context?: Selector; + /** + * Will automatically hide a popup on scroll event in this context + */ + scrollContext?: Selector; + /** + * Number of pixels that a popup is allowed to appear outside the boundaries of its context. + * This allows for permissible rounding errors when an element is against the edge of its context. + * + * @default 2 + */ + jitter?: number; + /** + * Position that the popup should appear + * + * @default 'top left' + */ + position?: string; + /** + * If a popup is inline it will be created next to current element, allowing for local css rules to apply. + * It will not be removed from the DOM after being hidden. + * Otherwise popups will appended to body and removed after being hidden. + * + * @default false + */ + inline?: boolean; + /** + * Whether popup contents should be preserved in the page after being hidden, allowing it to re-appear slightly faster on subsequent loads. + * + * @default false + */ + preserve?: boolean; + /** + * Can be set to adjacent or opposite to prefer adjacent or opposite position if popup cannot fit on screen + * + * @default 'adjacent' + */ + prefer?: 'adjacent' | 'opposite'; + /** + * When set to false, a popup will not appear and produce an error message if it cannot entirely fit on page. + * Setting this to a position like, right center forces the popup to use this position as a last resort even if it is partially offstage. + * Setting this to true will use the last attempted position. + * + * @default false + */ + lastResort?: boolean | string; + /** + * Event used to trigger popup. Can be either focus, click, hover, or manual. Manual popups must be triggered with $('.element').popup('show'); + * + * @default 'hover' + */ + on?: 'focus' | 'click' | 'hover' | 'manual'; + /** + * Delay in milliseconds before showing or hiding a popup on hover or focus + */ + delay?: { + show?: number; + hide?: number; + }; + /** + * Named transition to use when animating menu in and out. Fade and slide down are available without including ui transitions + * + * @default 'slide down' + * @see {@link http://semantic-ui.com/modules/transition.html} + */ + transition?: string; + /** + * Duration of animation events + * + * @default 200 + */ + duration?: number; + /** + * Whether popup should set fluid popup variation width on load to avoid width: 100% including padding + * + * @default true + */ + setFluidWidth?: boolean; + /** + * Whether popup should not close on hover (useful for popup navigation menus) + * + * @default false + */ + hoverable?: boolean; + /** + * When using on: 'click' specifies whether clicking the page should close the popup + * + * @default true + */ + closable?: boolean; + /** + * When using on: 'hover' whether touchstart events should be added to allow the popup to be triggered + */ + addTouchEvents?: boolean; + /** + * Whether popup should hide on scroll or touchmove, auto only hides for popups without on: 'click'. + * Set this to false to prevent mobile browsers from closing popups when you tap inside input fields. + * + * @default 'auto' + */ + hideOnScroll?: 'auto' | false; + /** + * If a selector or jQuery object is specified this allows the popup to be positioned relative to that element. + * + * @default false + */ + target?: false | Selector; + /** + * Offset for distance of popup from element + * + * @default 0 + */ + distanceAway?: number; + /** + * Offset in pixels from calculated position + * + * @default 0 + */ + offset?: number; + /** + * Number of iterations before giving up search for popup position when a popup cannot fit on screen + * + * @default 10 + */ + maxSearchDepth?: number; + + // endregion + + // region Callbacks + + /** + * Callback on popup element creation, with created popup + */ + onCreate?: (this: JQuery, $module: JQuery) => void; + /** + * Callback immediately before Popup is removed from DOM + */ + onRemove?: (this: JQuery, $module: JQuery) => void; + /** + * Callback before popup is shown. Returning false from this callback will cancel the popup from showing. + */ + onShow?: (this: JQuery, $module: JQuery) => false | void; + /** + * Callback after popup is shown + */ + onVisible?: (this: JQuery, $module: JQuery) => void; + /** + * Callback before popup is hidden. Returning false from this callback will cancel the popup from hiding. + */ + onHide?: (this: JQuery, $module: JQuery) => false | void; + /** + * Callback after popup is hidden + */ + onHidden?: (this: JQuery, $module: JQuery) => void; + /** + * Callback after popup cannot be plaed on screen + */ + onUnplaceable?: (this: JQuery, $module: JQuery) => void; + + // endregion + + // region Content Settings + + /** + * Popup variation to use, can use multiple variations with a space delimiter + */ + variation?: string; + /** + * Content to display + */ + content?: string; + /** + * Title to display alongside content + */ + title?: string; + /** + * HTML content to display instead of preformatted title and content + */ + html?: string; + + // endregion + + // region DOM Settings + + /** + * DOM Selectors used internally + */ + selector?: { + /** + * @default '.ui.popup' + */ + popup?: string; + }; + /** + * HTML Data attributes used to store data + */ + metadata?: { + /** + * @default 'content' + */ + content?: string; + /** + * @default 'html' + */ + html?: string; + /** + * @default 'offset' + */ + offset?: string; + /** + * @default 'position' + */ + position?: string; + /** + * @default 'title' + */ + title?: string; + /** + * @default 'variation' + */ + variation?: string; + }; + /** + * Class names used to attach style to state + */ + className?: { + /** + * @default 'loading' + */ + loading?: string; + /** + * @default 'ui popup' + */ + popup?: string; + /** + * @default 'top left center bottom right' + */ + position?: string; + /** + * @default 'visible' + */ + visible?: string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default 'The position you specified is not a valid position' + */ + invalidPosition?: string; + /** + * @default 'Popup does not fit within the boundaries of the viewport' + */ + cannotPlace?: string; + /** + * @default 'The method you called is not defined.' + */ + method?: string; + /** + * @default 'This module requires ui transitions ' + */ + noTransition?: string; + /** + * @default 'The target or popup you specified does not exist on the page' + */ + notFound?: string; + }; + + // endregion + } + + // endregion + + // region Progress + + /** + * @see {@link http://semantic-ui.com/modules/progress.html#/settings} + */ + interface ProgressSettings extends ComponentSettings { + // region Progress Settings + + /** + * Whether success state should automatically trigger when progress completes + * + * @default true + */ + autoSuccess?: boolean; + /** + * Whether progress should automatically show activity when incremented + * + * @default true + */ + showActivity?: boolean; + /** + * When set to true, values that calculate to above 100% or below 0% will be adjusted. + * When set to false, inappropriate values will produce an error. + * + * @default true + */ + limitValues?: boolean; + /** + * Can be set to either to display progress as percent or ratio. Matches up to corresponding text template with the same name. + * + * @default 'percent' + */ + label?: 'percent' | 'ratio'; + /** + * When incrementing without value, sets range for random increment value + */ + random?: { + /** + * @default 2 + */ + min?: number; + /** + * @default 5 + */ + max?: number; + }; + /** + * Decimal point precision for calculated progress + * + * @default 1 + */ + precision?: number; + /** + * Setting a total value will make each call to increment get closer to this total (i.e. 1/20, 2/20 etc) + * + * @default false + */ + total?: false | number; + /** + * Sets current value, when total is specified, this is used to calculate a ratio of the total, with percent this should be the overall percent + * + * @default false + */ + value?: false | number; + + // endregion + + // region Callbacks + + /** + * Callback on percentage change + */ + onChange?: (this: JQuery, percent: number, value: number, total: number) => void; + /** + * Callback on success state + */ + onSuccess?: (this: JQuery, total: number) => void; + /** + * Callback on active state + */ + onActive?: (this: JQuery, value: number, total: number) => void; + /** + * Callback on error state + */ + onError?: (this: JQuery, value: number, total: number) => void; + /** + * Callback on warning state + */ + onWarning?: (this: JQuery, value: number, total: number) => void; + + // endregion + + // region DOM Settings + + /** + * Text content for each state, uses simple templating with {percent}, {value}, {total} + */ + text?: { + /** + * @default false + */ + active?: false | string; + /** + * @default false + */ + error?: false | string; + /** + * @default false + */ + success?: false | string; + /** + * @default false + */ + warning?: false | string; + /** + * @default '{percent}%' + */ + percent?: false | string; + /** + * @default '{value} of {total}' + */ + ratio?: false | string; + }; + /** + * Regular expressions used by module + */ + regExp?: { + /** + * @default /\{\$*[A-z0-9]+\}/g + */ + variable?: RegExp; + }; + /** + * Selectors used by module + */ + selector?: { + /** + * @default '> .bar + */ + bar?: string; + /** + * @default '> .label' + */ + label?: string; + /** + * @default '.bar > .progress' + */ + progress?: string; + }; + /** + * DOM metadata used by module + */ + metadata?: { + /** + * @default 'percent' + */ + percent?: string; + /** + * @default 'total' + */ + total?: string; + /** + * @default 'value' + */ + value?: string; + }; + /** + * Class names used to attach style to state + */ + className?: { + /** + * @default 'active' + */ + active?: string; + /** + * @default 'error' + */ + error?: string; + /** + * @default 'success' + */ + success?: string; + /** + * @default 'warning' + */ + warning?: string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default 'The method you called is not defined.' + */ + method?: string; + /** + * @default 'Progress value is non numeric' + */ + nonNumeric?: string; + }; + + // endregion + } + + // endregion + + // region Rating + + /** + * @see {@link http://semantic-ui.com/modules/rating.html#/settings} + */ + interface RatingSettings extends ComponentSettings { + // region Rating Settings + + /** + * A number representing the default rating to apply + * + * @default 0 + */ + initialRating?: number; + /** + * Whether callbacks like onRate should fire immediately after initializing with the current value. + * + * @default false + */ + fireOnInit?: boolean; + /** + * By default a rating will be only clearable if there is 1 icon. Setting to true/false will allow or disallow a user to clear their rating + * + * @default 'auto' + */ + clearable?: 'auto' | boolean; + /** + * Whether to enable user's ability to rate + * + * @default true + */ + interactive?: boolean; + + // endregion + + // region Callbacks + + /** + * Is called after user selects a new rating + */ + onRate?: (this: JQuery, value: number) => void; + + // endregion + + // region DOM Settings + + selector?: { + /** + * @default '.icon' + */ + icon?: string; + }; + className?: { + /** + * @default 'active' + */ + active?: string; + /** + * @default 'hover' + */ + hover?: string; + /** + * @default 'loading' + */ + loading?: string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default 'You called a rating action that was not defined' + */ + action?: string; + }; + + // endregion + } + + // endregion + + // region Search + + /** + * @see {@link http://semantic-ui.com/modules/search.html#/settings} + */ + interface SearchSettings extends ComponentSettings { + // region Behavior + + /** + * Settings for API call. + * + * @see {@link http://semantic-ui.com/behaviors/api.html#/usage} + */ + apiSettings?: ApiSettings; + /** + * Minimum characters to query for results + * + * @default 1 + */ + minCharacters?: number; + /** + * Named transition to use when animating menu in and out. Fade and slide down are available without including ui transitions + * + * @default 'fade' + * @see {@link http://semantic-ui.com/modules/transition.html} + */ + transition?: string; + /** + * Duration of animation events + * + * @default 300 + */ + duration?: number; + /** + * Maximum results to display when using local and simple search, maximum category count for category search + * + * @default 7 + */ + maxResults?: number; + /** + * Caches results locally to avoid requerying server + * + * @default true + */ + cache?: boolean; + /** + * Specify a Javascript object which will be searched locally + * + * @default false + */ + source?: false | any; + /** + * Whether the search should automatically select the first search result after searching + * + * @default false + */ + selectFirstResult?: boolean; + /** + * Whether a "no results" message should be shown if no results are found. (These messages can be modified using the template object specified below) + * + * @default false + */ + showNoResults?: boolean; + /** + * Return local results that match anywhere inside your content + * + * @default true + */ + searchFullText?: boolean; + /** + * List mapping display content to JSON property, either with API or source. + */ + fields?: { + /** + * array of categories (category view) + * + * @default 'results' + */ + categories?: string; + /** + * name of category (category view) + * + * @default 'name' + */ + categoryName?: string; + /** + * array of results (category view) + * + * @default 'results' + */ + categoryResults?: string; + /** + * result description + * + * @default 'description' + */ + description?: string; + /** + * result image + * + * @default 'image' + */ + image?: string; + /** + * result price + * + * @default 'price' + */ + price?: string; + /** + * array of results (standard) + * + * @default 'results' + */ + results?: string; + /** + * result title + * + * @default 'title' + */ + title?: string; + /** + * "view more" object name + * + * @default 'action' + */ + action?: string; + /** + * "view more" text + * + * @default 'text' + */ + actionText?: string; + /** + * "view more" url + * + * @default 'url' + */ + actionURL?: string; + }; + /** + * Specify object properties inside local source object which will be searched + */ + searchFields?: string[]; + /** + * Delay before hiding results after search blur + * + * @default 0 + */ + hideDelay?: number; + /** + * Delay before querying results on inputchange + * + * @default 100 + */ + searchDelay?: number; + /** + * Easing equation when using fallback Javascript animation + * + * @default 'easeOutExpo' + */ + easing?: string; + + // endregion + + // region Callbacks + + /** + * Callback on element selection by user. + * The first parameter includes the filtered response results for that element. + * The function should return false to prevent default action (closing search results and selecting value). + */ + onSelect?: (this: JQuery, result: any, response: any) => false | void; + /** + * Callback after processing element template to add HTML to results. Function should return false to prevent default actions. + */ + onResultsAdd?: (this: JQuery, html: string) => false | void; + /** + * Callback on search query + */ + onSearchQuery?: (this: JQuery, query: string) => void; + /** + * Callback on server response + */ + onResults?: (this: JQuery, response: any) => void; + /** + * Callback when results are opened + */ + onResultsOpen?: (this: JQuery) => void; + /** + * Callback when results are closed + */ + onResultsClose?: (this: JQuery) => void; + + // endregion + + // region Templates + + templates?: { + escape?: (string: string) => string; + message?: (message: string, type: string) => string; + category?: (response: any) => string; + standard?: (response: any) => string; + }; + + // endregion + + // region DOM Settings + + /** + * Regular expressions used for matching + */ + regExp?: { + /** + * @default /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g + */ + escape?: RegExp; + /** + * @default '(?:\s|^)' + */ + beginsWith?: string; + }; + /** + * Selectors used to find parts of a module + */ + selector?: { + /** + * @default '.prompt' + */ + prompt?: string; + /** + * @default '.search.button' + */ + searchButton?: string; + /** + * @default '.results' + */ + results?: string; + /** + * @default '.category' + */ + category?: string; + /** + * @default '.result' + */ + result?: string; + }; + /** + * HTML5 metadata attributes used internally + */ + metadata?: { + /** + * @default 'cache' + */ + cache?: string; + /** + * @default 'results' + */ + results?: string; + }; + /** + * Class names used to determine element state + */ + className?: { + /** + * @default 'active' + */ + active?: string; + /** + * @default 'empty' + */ + empty?: string; + /** + * @default 'focus' + */ + focus?: string; + /** + * @default 'loading' + */ + loading?: string; + /** + * @default 'down' + */ + pressed?: string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default 'Cannot search. No source used, and Semantic API module was not included' + */ + source?: string; + /** + * @default 'Your search returned no results' + */ + noResults?: string; + /** + * @default 'Error in debug logging, exiting.' + */ + logging?: string; + /** + * @default 'A valid template name was not specified.' + */ + noTemplate?: string; + /** + * @default 'There was an issue with querying the server.' + */ + serverError?: string; + /** + * @default 'Results must be an array to use maxResults setting' + */ + maxResults?: string; + /** + * @default 'The method you called is not defined.' + */ + method?: string; + }; + + // endregion + } + + // endregion + + // region Shape + + /** + * @see {@link http://semantic-ui.com/modules/shape.html#/settings} + */ + interface ShapeSettings extends ComponentSettings { + // region Shape Settings + + /** + * Duration of side change animation + * + * @default 700 + */ + duration?: number; + /** + * When set to next will use the width of the next side during the shape's animation. + * When set to initial it will use the width of the shape at initialization. + * When set to a specific pixel height, will force the width to that height. + * + * @default 'initial' + * @since 2.2 + */ + width?: 'next' | 'initial' | number; + /** + * When set to next will use the height of the next side during the shape's animation. + * When set to initial it will use the height of the shape at initialization. + * When set to a specific pixel height, will force the height to that height. + * + * @default 'initial' + * @since 2.2 + */ + height?: 'next' | 'initial' | number; + + // endregion + + // region Callbacks + + /** + * Is called before side change + */ + beforeChange?: (this: JQuery) => void; + /** + * Is called after visible side change + */ + onChange?: (this: JQuery) => void; + + // endregion + + // region DOM Settings + + selector?: { + /** + * @default '.sides' + */ + sides?: string; + /** + * @default '.side' + */ + side?: string; + }; + className?: { + /** + * @default 'animating' + */ + animating?: string; + /** + * @default 'hidden' + */ + hidden?: string; + /** + * @default 'loading' + */ + loading?: string; + /** + * @default 'active' + */ + active?: string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default 'You tried to switch to a side that does not exist.' + */ + side?: string; + /** + * @default 'The method you called is not defined' + */ + method?: string; + }; + + // endregion + } + + interface Translation { + transform: string; + } + + // endregion + + // region Sidebar + + /** + * @see {@link http://semantic-ui.com/modules/sidebar.html#/settings} + */ + interface SidebarSettings extends ComponentSettings { + // region Behavior + + /** + * Context which sidebar will appear inside + * + * @default 'body' + */ + context?: Selector; + /** + * Whether multiple sidebars can be open at once + * + * @default false + */ + exclusive?: boolean; + /** + * Whether sidebar can be closed by clicking on page + * + * @default true + */ + closable?: boolean; + /** + * Whether to dim page contents when sidebar is visible + * + * @default true + */ + dimPage?: boolean; + /** + * Whether to lock page scroll when sidebar is visible + * + * @default false + */ + scrollLock?: boolean; + /** + * Whether to return to original scroll position when sidebar is hidden, automatically occurs with transition: scale + * + * @default false + */ + returnScroll?: boolean; + /** + * When sidebar is initialized without the proper HTML, using this option will defer creation of DOM to use requestAnimationFrame. + * + * @default false + */ + delaySetup?: boolean; + + // endregion + + // region Animation + + /** + * Named transition to use when animating sidebar. Defaults to 'auto' which selects transition from defaultTransition based on direction. + * + * @default 'auto' + */ + transition?: string; + /** + * Named transition to use when animating when detecting mobile device. Defaults to 'auto' which selects transition from defaultTransition based on direction. + * + * @default 'auto' + */ + mobileTransition?: string; + /** + * Default transitions for each direction and screen size, used with transition: auto + */ + defaultTransition?: { + computer?: { + /** + * @default 'uncover' + */ + left?: string; + /** + * @default 'uncover' + */ + right?: string; + /** + * @default 'overlay' + */ + top?: string; + /** + * @default 'overlay' + */ + bottom?: string; + }; + mobile?: { + /** + * @default 'uncover' + */ + left?: string; + /** + * @default 'uncover' + */ + right?: string; + /** + * @default 'overlay' + */ + top?: string; + /** + * @default 'overlay' + */ + bottom?: string; + }; + }; + /** + * Whether Javascript animations should be used. Defaults to false. Setting to auto will use legacy animations only for browsers that do not support CSS transforms + * + * @default false + */ + useLegacy?: 'auto' | boolean; + /** + * Duration of sidebar animation when using legacy Javascript animation + * + * @default 500 + */ + duration?: number; + /** + * Easing to use when using legacy Javascript animation + * + * @default 'easeInOutQuint' + */ + easing?: string; + + // endregion + + // region Callbacks + + /** + * Is called when a sidebar begins animating in. + */ + onVisible?: (this: JQuery) => void; + /** + * Is called when a sidebar has finished animating in. + */ + onShow?: (this: JQuery) => void; + /** + * Is called when a sidebar begins to hide or show + */ + onChange?: (this: JQuery) => void; + /** + * Is called before a sidebar begins to animate out. + */ + onHide?: (this: JQuery) => void; + /** + * Is called after a sidebar has finished animating out. + */ + onHidden?: (this: JQuery) => void; + + // endregion + + // region DOM Settings + + className?: { + /** + * @default 'active' + */ + active?: string; + /** + * @default 'animating' + */ + animating?: string; + /** + * @default 'dimmed' + */ + dimmed?: string; + /** + * @default 'ios' + */ + ios?: string; + /** + * @default 'pushable' + */ + pushable?: string; + /** + * @default 'pushed' + */ + pushed?: string; + /** + * @default 'right' + */ + right?: string; + /** + * @default 'top' + */ + top?: string; + /** + * @default 'left' + */ + left?: string; + /** + * @default 'bottom' + */ + bottom?: string; + /** + * @default 'visible' + */ + visible?: string; + }; + regExp?: { + /** + * @default /(iPad|iPhone|iPod)/g + */ + ios?: RegExp; + /** + * @default /Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g + */ + mobile?: RegExp; + }; + selector?: { + /** + * @default '.fixed' + */ + fixed?: string; + /** + * @default 'script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed' + */ + omitted?: string; + /** + * @default '.pusher' + */ + pusher?: string; + /** + * @default '.ui.sidebar' + */ + sidebar?: string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default 'The method you called is not defined.' + */ + method?: string; + /** + * @default 'Had to add pusher element. For optimal performance make sure body content is inside a pusher element' + */ + pusher?: string; + /** + * @default 'Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag' + */ + movedSidebar?: string; + /** + * @default 'The overlay setting is no longer supported, use animation: overlay' + */ + overlay?: string; + /** + * @default 'There were no elements that matched the specified selector' + */ + notFound?: string; + }; + + // endregion + } + + // endregion + + // region Sticky + + /** + * @see {@link http://semantic-ui.com/modules/sticky.html#/settings} + */ + interface StickySettings extends ComponentSettings { + // region Sticky Settings + + /** + * Whether element should be "pushed" by the viewport, attaching to the bottom of the screen when scrolling up + * + * @default false + */ + pushing?: boolean; + /** + * Sticky container height will only be set if the difference between heights of container and context is larger than this jitter value. + * + * @default 5 + */ + jitter?: number; + /** + * Whether any change in context DOM should automatically refresh cached sticky positions + * + * @default false + */ + observeChanges?: boolean; + /** + * Context which sticky element should stick to + * + * @default false + */ + context?: false | Selector; + /** + * Context which sticky should attach onscroll events. + * + * @default 'window' + */ + scrollContext?: Selector; + /** + * Offset in pixels from the top of the screen when fixing element to viewport + * + * @default 0 + */ + offset?: number; + /** + * Offset in pixels from the bottom of the screen when fixing element to viewport + * + * @default 0 + */ + bottomOffset?: number; + + // endregion + + // region Callbacks + + /** + * Callback when element is repositioned from layout change + */ + onReposition?: (this: JQuery) => void; + /** + * Callback when requestAnimationFrame fires from scroll handler. + */ + onScroll?: (this: JQuery) => void; + /** + * Callback when element is fixed to page + */ + onStick?: (this: JQuery) => void; + /** + * Callback when element is unfixed from page + */ + onUnstick?: (this: JQuery) => void; + /** + * Callback when element is bound to top of parent container + */ + onTop?: (this: JQuery) => void; + /** + * Callback when element is bound to bottom of parent container + */ + onBottom?: (this: JQuery) => void; + + // endregion + + // region DOM Settings + + /** + * Class names used to attach style to state + */ + className?: { + /** + * @default 'bound' + */ + bound?: string; + /** + * @default 'fixed' + */ + fixed?: string; + /** + * @default 'native' + */ + supported?: string; + /** + * @default 'top' + */ + top?: string; + /** + * @default 'bottom' + */ + bottom?: string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default 'Sticky element must be inside a relative container' + */ + container?: string; + /** + * @default 'Element is hidden, you must call refresh after element becomes visible' + */ + visible?: string; + /** + * @default 'The method you called is not defined.' + */ + method?: string; + /** + * @default 'Context specified does not exist' + */ + invalidContext?: string; + /** + * @default 'Sticky element is larger than its container, cannot create sticky.' + */ + elementSize?: string; + }; + + // endregion + } + + // endregion + + // region Tab + + /** + * @see {@link http://semantic-ui.com/modules/tab.html#/settings} + */ + interface TabSettings extends ComponentSettings { + // region Tab Settings + + /** + * Whether tab should load remote content as same url as history + * + * @default false + */ + auto?: boolean; + /** + * When set to siblings will only deactivate elements that are DOM siblings with the activated element. + * When set to all the component will deactivate all other elements initialized at the same time. + * + * @default 'siblings' + * @since 2.2 + */ + deactivate?: 'siblings' | 'all'; + /** + * Whether to record history events for tab changes + * + * @default false + */ + history?: boolean; + /** + * Do not load content remotely on first tab load. Useful when open tab is rendered on server. + * + * @default false + */ + ignoreFirstLoad?: boolean; + /** + * Whether inline scripts in tab HTML should be parsed on tab load. + * Defaults to once, parsing only on first load. + * Can also be set to true or false to always parse or never parse inline scripts. + * + * @default 'once' + */ + evaluateScripts?: 'once' | boolean; + /** + * Tab should reload content every time it is opened + */ + alwaysRefresh?: boolean; + /** + * Can be set to either response, DOM or html. + * Using DOM will cache the a clone of the DOM tree, preserving all events as they existed on render. + * response will cache the original response on load, this way callbacks always receive the same content. + * Using html will cache the resulting html after all callbacks, making sure any changes to content are preserved. + * + * @default 'response' + */ + cacheType?: 'response' | 'DOM' | 'html'; + /** + * Tab should cache content after loading locally to avoid server trip on second load + * + * @default true + */ + cache?: boolean; + /** + * Settings object for $.api call + * + * @default false + * @see {@link http://semantic-ui.com/behaviors/api.html} + */ + apiSettings?: ApiSettings; + /** + * Can be set to hash or state. + * Hash will use an in-page link to create history events. + * State will use DOM History and load pages from server on refresh. + * + * @default 'hash' + * @see {@link https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history} + */ + historyType?: 'hash' | 'state'; + /** + * When using historyType state you must specify the base URL for all internal links. + * + * @default false + */ + path?: false | string; + /** + * Tabs are limited to those found inside this context + * + * @default false + */ + context?: false | Selector; + /** + * If enabled limits tabs to children of passed context + * + * @default false + */ + childrenOnly?: boolean; + /** + * Maximum amount of nested tabs allowed (avoids recursion) + * + * @default 25 + */ + maxDepth?: number; + + // endregion + + // region Callbacks + + /** + * Callback only the first time a tab is loaded + */ + onFirstLoad?: (this: JQuery, tabPath: string, parameterArray: any[], historyEvent: any) => void; + /** + * Callback every time a tab is loaded + */ + onLoad?: (this: JQuery, tabPath: string, parameterArray: any[], historyEvent: any) => void; + /** + * Called when a tab begins loading remote content + */ + onRequest?: (this: JQuery, tabPath: string) => void; + /** + * Called after a tab becomes visible + */ + onVisible?: (this: JQuery, tabPath: string) => void; + + // endregion + + // region DOM Settings + + /** + * Functions used to return content + */ + templates?: { + /** + * returns page title + */ + determineTitle?: (tabArray: any[]) => string; + }; + /** + * Selectors used by module + */ + selector?: { + /** + * @default '.ui.tab' + */ + tabs?: string; + /** + * @default '.ui:not(.menu)' + */ + parent?: string; + }; + /** + * DOM metadata used by module + */ + metadata?: { + /** + * @default 'tab' + */ + tab?: string; + /** + * @default 'loaded' + */ + loaded?: string; + /** + * @default 'promise' + */ + promise?: string; + }; + /** + * Class names used to attach style to state + */ + className?: { + /** + * @default 'loading' + */ + loading?: string; + /** + * @default 'active' + */ + active?: string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default 'You attempted to load content without API module' + */ + api?: string; + /** + * @default 'The method you called is not defined' + */ + method?: string; + /** + * @default 'Activated tab cannot be found for this context.' + */ + missingTab?: string; + /** + * @default 'The tab you specified is missing a content url.' + */ + noContent?: string; + /** + * @default 'History enabled, but no path was specified' + */ + path?: string; + /** + * @default 'Max recursive depth reached' + */ + recursion?: string; + /** + * @default 'The state library has not been initialized' + */ + state?: string; + }; + + // endregion + } + + // endregion + + // region Transition + + /** + * @see {@link http://semantic-ui.com/modules/transition.html#/settings} + */ + interface TransitionSettings extends ComponentSettings { + // region Transition Settings + + /** + * Named animation event to used. Must be defined in CSS. + * + * @default 'fade' + */ + animation?: string; + /** + * Interval in MS between each elements transition + * + * @default 0 + */ + interval?: number; + /** + * When an interval is specified, sets order of animations. auto reverses only animations that are hiding. + * + * @default 'auto' + */ + reverse?: 'auto' | boolean; + /** + * Specify the final display type (block, inline-block etc) so that it doesn't have to be calculated. + * + * @default false + */ + displayType?: false | string; + /** + * Duration of the CSS transition animation + * + * @default 500 + */ + duration?: number; + /** + * If enabled a timeout will be added to ensure animationend callback occurs even if element is hidden + */ + useFailSafe?: boolean; + /** + * If enabled will allow same animation to be queued while it is already occurring + */ + allowRepeats?: boolean; + /** + * Whether to automatically queue animation if another is occurring + */ + queue?: boolean; + + // endregion + + // region Callbacks + + /** + * Callback on each transition that changes visibility to shown + */ + onShow?: (this: JQuery) => void; + /** + * Callback on each transition that changes visibility to hidden + */ + onHide?: (this: JQuery) => void; + /** + * Callback on animation start, useful for queued animations + */ + onStart?: (this: JQuery) => void; + /** + * Callback on each transition complete + */ + onComplete?: (this: JQuery) => void; + + // endregion + + // region DOM Settings + + /** + * Class names used to attach style to state + */ + className?: { + /** + * @default 'animating' + */ + animating?: string; + /** + * @default 'disabled' + */ + disabled?: string; + /** + * @default 'hidden' + */ + hidden?: string; + /** + * @default 'in' + */ + inward?: string; + /** + * @default 'loading' + */ + loading?: string; + /** + * @default 'looping' + */ + looping?: string; + /** + * @default 'out' + */ + outward?: string; + /** + * @default 'transition' + */ + transition?: string; + /** + * @default 'visible' + */ + visible?: string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default 'There is no CSS animation matching the one you specified.' + */ + noAnimation?: string; + /** + * @default 'The method you called is not defined' + */ + method?: string; + }; + + // endregion + } + + // endregion + + // endregion + + // region Behaviors + + // region API + + /** + * @see {@link http://semantic-ui.com/behaviors/api.html#/settings} + */ + interface ApiSettings extends ComponentSettings { + // region Behavior + + /** + * When API event should occur + * + * @default 'auto' + */ + on?: string; + /** + * Can be set to 'local' to cache successful returned AJAX responses when using a JSON API. + * This helps avoid server round trips when API endpoints will return the same results when accessed repeatedly. + * Setting to false, will add cache busting parameters to the URL. + * + * @default true + */ + cache?: 'local' | boolean; + /** + * UI state will be applied to this element, defaults to triggering element. + */ + stateContext?: Selector; + /** + * Whether to encode parameters with encodeURIComponent before adding into url string + * + * @default true + */ + encodeParameters?: boolean; + /** + * Whether to automatically include default data like {value} and {text} + * + * @default true + */ + defaultData?: boolean; + /** + * Whether to serialize closest form and include in request + * + * @default false + */ + serializeForm?: boolean; + /** + * How long to wait when a request is made before triggering request, useful for rate limiting oninput + * + * @default 0 + */ + throttle?: number; + /** + * When set to false will not delay the first request made, when no others are queued + * + * @default true + */ + throttleFirstRequest?: boolean; + /** + * Whether an API request can occur while another request is still pending + * + * @default false + */ + interruptRequests?: boolean; + /** + * Minimum duration to show loading indication + * + * @default 0 + */ + loadingDuration?: number; + /** + * The default auto will automatically remove error state after error duration, unless the element is a form + * + * @default 'auto' + */ + hideError?: 'auto' | boolean; + /** + * Setting to true, will not remove error. + * Setting to a duration in milliseconds to show error state after request error. + * + * @default 2000 + */ + errorDuration?: true | number; + + // endregion + + // region Request Settings + + /** + * Named API action for query, originally specified in $.fn.settings.api + */ + action?: string | false; + /** + * Templated URL for query, will override specified action + */ + url?: string | false; + /** + * Variables to use for replacement + */ + urlData?: any | false; + /** + * Can be set to a Javascript object which will be returned automatically instead of requesting JSON from server + */ + response?: any | false; + /** + * When specified, this function can be used to retrieve content from a server and return it asynchronously instead of a standard AJAX call. + * The callback function should return the server response. + * + * @default false + */ + responseAsync?: ((settings: ApiSettings, callback: (response: any) => void) => void) | false; + /** + * @see response + */ + mockResponse?: any | false; + /** + * @see responseAsync + */ + mockResponseAsync?: ((settings: ApiSettings, callback: (response: any) => void) => void) | false; + /** + * Method for transmitting request to server + */ + method?: 'post' | 'get'; + /** + * Expected data type of response + */ + dataType?: 'xml' | 'json' | 'jsonp' | 'script' | 'html' | 'text'; + /** + * POST/GET Data to Send with Request + */ + data?: any; + + // endregion + + // region Callbacks + + /** + * Allows modifying settings before request, or cancelling request + */ + beforeSend?: (settings: ApiSettings) => any; + /** + * Allows modifying XHR object for request + */ + beforeXHR?: (xhrObject: JQueryXHR) => any; + /** + * Callback that occurs when request is made. Receives both the API success promise and the XHR request promise. + */ + onRequest?: (promise: JQueryDeferred, xhr: JQueryXHR) => void; + /** + * Allows modifying the server's response before parsed by other callbacks to determine API event success + */ + onResponse?: (response: any) => void; + /** + * Determines whether completed JSON response should be treated as successful + * + * @see {@link http://semantic-ui.com/behaviors/api.html#determining-json-success} + */ + successTest?: (response: any) => boolean; + /** + * Callback after successful response, JSON response must pass successTest + */ + onSuccess?: (response: any, element: JQuery, xhr: JQueryXHR) => void; + /** + * Callback on request complete regardless of conditions + */ + onComplete?: (response: any, element: JQuery, xhr: JQueryXHR) => void; + /** + * Callback on failed response, or JSON response that fails successTest + */ + onFailure?: (response: any, element: JQuery) => void; + /** + * Callback on server error from returned status code, or XHR failure. + */ + onError?: (errorMessage: string, element: JQuery, xhr: JQueryXHR) => void; + /** + * Callback on abort caused by user clicking a link or manually cancelling request. + */ + onAbort?: (errorMessage: string, element: JQuery, xhr: JQueryXHR) => void; + + // endregion + + // region DOM Settings + + /** + * Regular expressions used for template matching + */ + regExp?: { + /** + * @default /\{\$*[A-z0-9]+\}/g + */ + required?: RegExp; + /** + * @default /\{\/\$*[A-z0-9]+\}/g + */ + optional?: RegExp; + }; + /** + * Selectors used to find parts of a module + */ + selector?: { + /** + * @default '.disabled' + */ + disabled?: string; + /** + * @default 'form' + */ + form?: string; + }; + /** + * Class names used to determine element state + */ + className?: { + /** + * @default 'loading' + */ + loading?: string; + /** + * @default 'error' + */ + error?: string; + }; + /** + * Metadata used to store XHR and response promise + */ + metadata?: { + /** + * @default 'action' + */ + action?: string; + /** + * @default 'url' + */ + url?: string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default 'The before send function has aborted the request' + */ + beforeSend?: string; + /** + * @default 'There was an error with your request' + */ + error?: string; + /** + * @default 'API Request Aborted. Exit conditions met' + */ + exitConditions?: string; + /** + * @default 'JSON could not be parsed during error handling' + */ + JSONParse?: string; + /** + * @default 'You are using legacy API success callback names' + */ + legacyParameters?: string; + /** + * @default 'API action used but no url was defined' + */ + missingAction?: string; + /** + * @default 'Required dependency jquery-serialize-object missing, using basic serialize' + */ + missingSerialize?: string; + /** + * @default 'No URL specified for API event' + */ + missingURL?: string; + /** + * @default 'The beforeSend callback must return a settings object, beforeSend ignored.' + */ + noReturnedValue?: string; + /** + * @default 'There was an error parsing your request' + */ + parseError?: string; + /** + * @default 'Missing a required URL parameter: ' + */ + requiredParameter?: string; + /** + * @default 'Server gave an error: ' + */ + statusMessage?: string; + /** + * @default 'Your request timed out' + */ + timeout?: string; + }; + + // endregion + } + + // endregion + + // region Form Validation + + /** + * @see {@link http://semantic-ui.com/behaviors/form.html#/settings} + */ + interface FormSettings extends ComponentSettings { + // region Form Settings + + /** + * Adds keyboard shortcuts for enter and escape keys to submit form and blur fields respectively + * + * @default true + */ + keyboardShortcuts?: boolean; + /** + * Event used to trigger validation. Can be either submit, blur or change. + * + * @default 'submit' + */ + on?: 'submit' | 'blur' | 'change'; + /** + * If set to true will revalidate fields with errors on input change + * + * @default true + */ + revalidate?: boolean; + /** + * Delay from last typed letter to validate a field when using on: change or when revalidating a field. + * + * @default true + */ + delay?: boolean; + /** + * Adds inline error on field validation error + * + * @default false + */ + inline?: boolean; + /** + * Named transition to use when animating validation errors. Fade and slide down are available without including ui transitions + * + * @default 'scale' + * @see {@link http://semantic-ui.com/modules/transition.html} + */ + transition?: string; + /** + * Animation speed for inline prompt + * + * @default 150 + */ + duration?: number; + + // endregion + + // region Form Prompts + + text?: { + /** + * @default 'Please enter a valid value' + */ + unspecifiedRule?: string; + /** + * @default 'This field' + */ + unspecifiedField?: string; + }; + prompt?: { + /** + * @default '{name} must have a value' + */ + empty?: string; + /** + * @default '{name} must be checked' + */ + checked?: string; + /** + * @default '{name} must be a valid e-mail' + */ + email?: string; + /** + * @default '{name} must be a valid url' + */ + url?: string; + /** + * @default '{name} is not formatted correctly' + */ + regExp?: string; + /** + * @default '{name} must be an integer' + */ + integer?: string; + /** + * @default '{name} must be a decimal number' + */ + decimal?: string; + /** + * @default '{name} must be set to a number' + */ + number?: string; + /** + * @default '{name} must be \'{ruleValue}\'' + */ + is?: string; + /** + * @default '{name} must be exactly \'{ruleValue}\'' + */ + isExactly?: string; + /** + * @default '{name} cannot be set to \'{ruleValue}\'' + */ + not?: string; + /** + * @default '{name} cannot be set to exactly \'{ruleValue}\'' + */ + notExactly?: string; + /** + * @default '{name} cannot contain \'{ruleValue}\'' + */ + contain?: string; + /** + * @default '{name} cannot contain exactly \'{ruleValue}\'' + */ + containExactly?: string; + /** + * @default '{name} must contain \'{ruleValue}\'' + */ + doesntContain?: string; + /** + * @default '{name} must contain exactly \'{ruleValue}\'' + */ + doesntContainExactly?: string; + /** + * @default '{name} must be at least {ruleValue} characters' + */ + minLength?: string; + /** + * @default '{name} must be at least {ruleValue} characters' + */ + length?: string; + /** + * @default '{name} must be exactly {ruleValue} characters' + */ + exactLength?: string; + /** + * @default '{name} cannot be longer than {ruleValue} characters' + */ + maxLength?: string; + /** + * @default '{name} must match {ruleValue} field' + */ + match?: string; + /** + * @default '{name} must have a different value than {ruleValue} field' + */ + different?: string; + /** + * @default '{name} must be a valid credit card number' + */ + creditCard?: string; + /** + * @default '{name} must have at least {ruleValue} choices' + */ + minCount?: string; + /** + * @default '{name} must have exactly {ruleValue} choices' + */ + exactCount?: string; + /** + * @default '{name} must have {ruleValue} or less choices' + */ + maxCount?: string; + }; + + // endregion + + // region Callbacks + + /** + * Callback on each valid field + */ + onValid?: (this: JQuery) => void; + /** + * Callback on each invalid field + */ + onInvalid?: (this: JQuery) => void; + /** + * Callback if a form is all valid + */ + onSuccess?: (this: JQuery, event: JQueryEventObject, fields: any) => void; + /** + * Callback if any form field is invalid + */ + onFailure?: (this: JQuery, formErrors: string[], fields: any) => void; + + // endregion + + // region DOM Settings + + /** + * Selectors used to match functionality to DOM + */ + selector?: { + /** + * @default '.error.message' + */ + message?: string; + /** + * @default 'input, textarea, select' + */ + field?: string; + /** + * @default '.field' + */ + group?: string; + /** + * @default 'input' + */ + input?: string; + /** + * @default '.prompt' + */ + prompt?: string; + /** + * @default '.submit' + */ + submit?: string; + }; + /** + * HTML5 metadata attributes + */ + metadata?: { + /** + * @default 'validate' + */ + validate?: string; + }; + /** + * Class names used to attach style to state + */ + className?: { + /** + * @default 'active' + */ + active?: string; + /** + * @default 'default' + */ + placeholder?: string; + /** + * @default 'disabled' + */ + disabled?: string; + /** + * @default 'visible' + */ + visible?: string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default 'The method you called is not defined.' + */ + method?: string; + }; + + // endregion + } + + // endregion + + // region Visibility + + /** + * @see {@link http://semantic-ui.com/behaviors/visibility.html#/settings} + */ + interface VisibilitySettings extends ComponentSettings { + // region Functionality + + /** + * When set to false a callback will occur each time an element passes the threshold for a condition. + * + * @default true + */ + once?: boolean; + /** + * When set to true a callback will occur anytime an element passes a condition not just immediately after the threshold is met. + * + * @default false + */ + continuous?: boolean; + /** + * Set to image to load images when on screen. Set to fixed to add class name fixed when passed. + * + * @default false + */ + type?: false | 'image' | 'fixed'; + /** + * Whether visibility conditions should be checked immediately on init + * + * @default true + */ + initialCheck?: boolean; + /** + * The scroll context visibility should use. + * + * @default 'window' + */ + context?: Selector; + /** + * Whether visibility conditions should be checked on window load. This ensures that after images load content positions will be updated correctly. + * + * @default true + */ + refreshOnLoad?: boolean; + /** + * Whether visibility conditions should be checked on window resize. Useful when content resizes causes continuous changes in position + * + * @default true + */ + refreshOnResize?: boolean; + /** + * Whether visibility conditions should be checked on calls to refresh. + * These calls can be triggered from either resize, load or manually calling $('.foo').visibility('refresh') + * + * @default true + */ + checkOnRefresh?: boolean; + /** + * Specify a z-index when using type: 'fixed'. + * + * @default 1 + * @since 2.2 + */ + zIndex?: number; + /** + * Value that context scrollTop should be adjusted in pixels. Useful for making content appear below content fixed to the page. + * + * @default 0 + */ + offset?: number; + /** + * Whether element calculations should include its margin + * + * @default false + */ + includeMargin?: boolean; + /** + * When set to an integer, scroll position will be debounced using this ms value. false will debounce with requestAnimationFrame. + * + * @default false + */ + throttle?: false | number; + /** + * Whether to automatically refresh content when changes are made to the element's DOM subtree + * + * @default true + */ + observeChanges?: boolean; + /** + * When using type: image allows you to specify transition when showing a loaded image + * + * @default false + */ + transition?: false | string; + /** + * When using type: image allows you to specify transition duration + * + * @default 1000 + */ + duration?: number; + + // endregion + + // region Visibility Callbacks + + /** + * Element's top edge has passed bottom of screen + */ + onTopVisible?: (this: JQuery) => void; + /** + * Element's top edge has passed top of the screen + */ + onTopPassed?: (this: JQuery) => void; + /** + * Element's bottom edge has passed bottom of screen + */ + onBottomVisible?: (this: JQuery) => void; + /** + * Any part of an element is visible on screen + */ + onPassing?: (this: JQuery) => void; + /** + * Element's bottom edge has passed top of screen + */ + onBottomPassed?: (this: JQuery) => void; + /** + * Element's top edge has not passed bottom of screen + */ + onTopVisibleReverse?: (this: JQuery) => void; + /** + * Element's top edge has not passed top of the screen + */ + onTopPassedReverse?: (this: JQuery) => void; + /** + * Element's bottom edge has not passed bottom of screen + */ + onBottomVisibleReverse?: (this: JQuery) => void; + /** + * Element's top has not passed top of screen but bottom has + */ + onPassingReverse?: (this: JQuery) => void; + /** + * Element's bottom edge has not passed top of screen + */ + onBottomPassedReverse?: (this: JQuery) => void; + + // endregion + + // region Image Callbacks + + /** + * Occurs after an image has completed loading + * + * @since 2.2 + */ + onLoad?: (this: JQuery) => void; + /** + * Occurs after all img initialized at the same time have loaded. + * + * @since 2.2 + */ + onAllLoaded?: (this: JQuery) => void; + + // endregion + + // region Fixed Callbacks + + /** + * Occurs after element has been assigned position fixed + * + * @since 2.2 + */ + onFixed?: (this: JQuery) => void; + /** + * Occurs after element has been removed from fixed position + * + * @since 2.2 + */ + onUnfixed?: (this: JQuery) => void; + + // endregion + + // region Utility Callbacks + + /** + * Occurs each time an elements calculations are updated + */ + onUpdate?: (this: JQuery, calculations: ElementCalculations) => void; + /** + * Occurs whenever element's visibility is refreshed + */ + onRefresh?: (this: JQuery) => void; + + // endregion + + // region DOM Settings + + /** + * Class names used to attach style to state + */ + className?: { + /** + * @default 'fixed' + */ + fixed?: string; + }; + + // endregion + + // region Debug Settings + + error?: { + /** + * @default 'The method you called is not defined.' + */ + method?: string; + }; + + // endregion + } + + interface ElementPosition { + fits: boolean; + offset: JQueryCoordinates; + width: number; + height: number; + } + + interface ElementCalculations extends ElementPosition { + margin?: { + top: number; + bottom: number; + }; + top: number; + bottom: number; + + topVisible: boolean; + topPassed: boolean; + bottomVisible: boolean; + bottomPassed: boolean; + pixelsPassed: number; + percentagePassed: number; + + onScreen: boolean; + passing: boolean; + offScreen: boolean; + } + + interface ScreenCalculations { + top: number; + bottom: number; + } + + interface ScreenSize { + height: number; + } + + // endregion + + // endregion +} diff --git a/semantic-ui/semantic-ui-tests.ts b/semantic-ui/semantic-ui-tests.ts new file mode 100644 index 0000000000..f116507459 --- /dev/null +++ b/semantic-ui/semantic-ui-tests.ts @@ -0,0 +1,140 @@ +function test_Accordion() { + const selector = '.ui.accordion'; + $(selector).accordion('refresh'); + $(selector).accordion('open', 0); + $(selector).accordion('close others'); + $(selector).accordion('close', 0); + $(selector).accordion('toggle', 0); + $(selector).accordion({ + selector: { + trigger: '.title .icon' + } + }); + $(selector).accordion(); +} +test_Accordion(); + +function test_Checkbox() { + const selector = '.ui.checkbox'; + $(selector).checkbox({}); + $(selector).checkbox(); +} +test_Checkbox(); + +function test_Dimmer() { + const selector = '.ui.dimmer'; + $(selector).dimmer({}); + $(selector).dimmer(); +} +test_Dimmer(); + +function test_Dropdown() { + const selector = '.ui.dropdown'; + $(selector).dropdown({}); + $(selector).dropdown(); +} +test_Dropdown(); + +function test_Embed() { + const selector = '.ui.embed'; + $(selector).embed({}); + $(selector).embed(); +} +test_Embed(); + +function test_Modal() { + const selector = '.ui.modal'; + $(selector).modal({}); + $(selector).modal(); +} +test_Modal(); + +function test_Nag() { + const selector = '.ui.nag'; + $(selector).nag({}); +} +test_Nag(); + +function test_Popup() { + const selector = '.ui.popup'; + $(selector).popup({}); + $(selector).popup(); +} +test_Popup(); + +function test_Progress() { + const selector = '.ui.progress'; + $(selector).progress({}); + $(selector).progress(); +} +test_Progress(); + +function test_Rating() { + const selector = '.ui.rating'; + $(selector).rating({}); + $(selector).rating(); +} +test_Rating(); + +function test_Search() { + const selector = '.ui.search'; + $(selector).search({}); + $(selector).search(); +} +test_Search(); + +function test_Shape() { + const selector = '.ui.shape'; + $(selector).shape({}); + $(selector).shape(); +} +test_Shape(); + +function test_Sidebar() { + const selector = '.ui.sidebar'; + $(selector).sidebar({}); + $(selector).sidebar(); +} +test_Sidebar(); + +function test_Sticky() { + const selector = '.ui.sticky'; + $(selector).sticky({}); + $(selector).sticky(); +} +test_Sticky(); + +function test_Tab() { + const selector = '.ui.tab'; + $(selector).tab({}); + $(selector).tab(); +} +test_Tab(); + +function test_Transition() { + const selector = '.ui.transition'; + $(selector).transition({}); + $(selector).transition(); +} +test_Transition(); + +function test_Api() { + const selector = '.ui.api'; + $(selector).api({}); + $(selector).api(); +} +test_Api(); + +function test_Form() { + const selector = '.ui.form'; + $(selector).form({}); + $(selector).form(); +} +test_Form(); + +function test_Visibility() { + const selector = '.ui.visibility'; + $(selector).visibility({}); + $(selector).visibility(); +} +test_Visibility(); diff --git a/semantic-ui/tsconfig.json b/semantic-ui/tsconfig.json new file mode 100644 index 0000000000..f57f321023 --- /dev/null +++ b/semantic-ui/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "semantic-ui-tests.ts" + ] +} diff --git a/semantic-ui/tslint.json b/semantic-ui/tslint.json new file mode 100644 index 0000000000..ec365f164b --- /dev/null +++ b/semantic-ui/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} From 57db8d571f777dfef1277a01f30107665e362eeb Mon Sep 17 00:00:00 2001 From: Brett Epps Date: Thu, 26 Jan 2017 00:22:29 -0600 Subject: [PATCH 44/54] Add types for keycloak-authz.js in keycloak-js package --- keycloak-js/index.d.ts | 2 +- keycloak-js/keycloak-authz.d.ts | 39 ++++++++++++++++++++++++++++++++ keycloak-js/keycloak-js-tests.ts | 4 ++++ keycloak-js/tsconfig.json | 3 ++- 4 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 keycloak-js/keycloak-authz.d.ts diff --git a/keycloak-js/index.d.ts b/keycloak-js/index.d.ts index 2cd417da6b..540084d6fd 100644 --- a/keycloak-js/index.d.ts +++ b/keycloak-js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for keycloak-js 2.4 +// Type definitions for keycloak-js 2.5 // Project: https://github.com/keycloak/keycloak // Definitions by: Brett Epps // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/keycloak-js/keycloak-authz.d.ts b/keycloak-js/keycloak-authz.d.ts new file mode 100644 index 0000000000..4db057ad97 --- /dev/null +++ b/keycloak-js/keycloak-authz.d.ts @@ -0,0 +1,39 @@ +import * as Keycloak from 'keycloak-js'; + +export as namespace KeycloakAuthorization; + +export = KeycloakAuthorization; + +/** + * Creates a new Keycloak client instance. + * @param config Path to a JSON config file or a plain config object. + */ +declare function KeycloakAuthorization(keycloak: Keycloak.KeycloakInstance): KeycloakAuthorization.KeycloakAuthorizationInstance; + +declare namespace KeycloakAuthorization { + export interface KeycloakAuthorizationPromise { + then(onGrant: (rpt: string) => void, onDeny: () => void, onError: () => void): void; + } + + export interface KeycloakAuthorizationInstance { + rpt: any; + config: { rpt_endpoint: string }; + + init(): void; + + /** + * This method enables client applications to better integrate with resource servers protected by a Keycloak + * policy enforcer. + * + * In this case, the resource server will respond with a 401 status code and a WWW-Authenticate header holding the + * necessary information to ask a Keycloak server for authorization data using both UMA and Entitlement protocol, + * depending on how the policy enforcer at the resource server was configured. + */ + authorize(wwwAuthenticateHeader: string): KeycloakAuthorizationPromise; + + /** + * Obtains all entitlements from a Keycloak server based on a given resourceServerId. + */ + entitlement(resourceServerId: string, entitlementRequest: {}): KeycloakAuthorizationPromise; + } +} diff --git a/keycloak-js/keycloak-js-tests.ts b/keycloak-js/keycloak-js-tests.ts index f0957d2114..dc97d8da18 100644 --- a/keycloak-js/keycloak-js-tests.ts +++ b/keycloak-js/keycloak-js-tests.ts @@ -11,4 +11,8 @@ import { KeycloakResponseType } from 'keycloak-js'; +import * as KeycloakAuthorization from 'keycloak-js/keycloak-authz'; +import { KeycloakAuthorizationPromise } from 'keycloak-js/keycloak-authz'; + let keycloak = Keycloak(); +let keycloakAuthz = KeycloakAuthorization(keycloak); diff --git a/keycloak-js/tsconfig.json b/keycloak-js/tsconfig.json index 02d8f5053a..7ac994a5dc 100644 --- a/keycloak-js/tsconfig.json +++ b/keycloak-js/tsconfig.json @@ -17,6 +17,7 @@ }, "files": [ "index.d.ts", + "keycloak-authz.d.ts", "keycloak-js-tests.ts" ] -} \ No newline at end of file +} From b3d69dbd466bc3876d7e411fa39e325433d4818d Mon Sep 17 00:00:00 2001 From: Olmo del Corral Date: Thu, 26 Jan 2017 07:47:00 +0100 Subject: [PATCH 45/54] fix Useful --- react-widgets/lib/DateTimePicker.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-widgets/lib/DateTimePicker.d.ts b/react-widgets/lib/DateTimePicker.d.ts index 6428927cf4..0760648984 100644 --- a/react-widgets/lib/DateTimePicker.d.ts +++ b/react-widgets/lib/DateTimePicker.d.ts @@ -32,7 +32,7 @@ interface DateTimePickerProps extends React.Props { */ currentDate?: Date; /* - * Default value for current date. Usefull for suggesting a date when the caldenar opens without keep forcing it once 'value' is set. + * Default value for current date. Useful for suggesting a date when the caldenar opens without keep forcing it once 'value' is set. */ defaultCurrentDate?: Date; /** From e13d67a3d0fc3afc7aa17bcc7dacd63c2aa3e20f Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Thu, 26 Jan 2017 07:11:56 -0500 Subject: [PATCH 46/54] Move tslint rule to tslint.json. --- semantic-ui/index.d.ts | 2 -- semantic-ui/tslint.json | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/semantic-ui/index.d.ts b/semantic-ui/index.d.ts index 0c8ddda9be..96a292bcce 100644 --- a/semantic-ui/index.d.ts +++ b/semantic-ui/index.d.ts @@ -5,8 +5,6 @@ /// -// tslint:disable:unified-signatures - interface JQuery { // TODO: Do all modules have a 'setting' behavior? diff --git a/semantic-ui/tslint.json b/semantic-ui/tslint.json index ec365f164b..25440fc88b 100644 --- a/semantic-ui/tslint.json +++ b/semantic-ui/tslint.json @@ -1,3 +1,6 @@ { - "extends": "../tslint.json" + "extends": "../tslint.json", + "rules": { + "unified-signatures": false + } } From 5bc6bd90add66f6ba740837a1413ea2d3d4a2620 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Thu, 26 Jan 2017 07:39:15 -0500 Subject: [PATCH 47/54] Fix typo. --- semantic-ui/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-ui/index.d.ts b/semantic-ui/index.d.ts index 96a292bcce..71a4868e3e 100644 --- a/semantic-ui/index.d.ts +++ b/semantic-ui/index.d.ts @@ -2989,7 +2989,7 @@ declare namespace SemanticUI { */ onHidden?: (this: JQuery, $module: JQuery) => void; /** - * Callback after popup cannot be plaed on screen + * Callback after popup cannot be placed on screen */ onUnplaceable?: (this: JQuery, $module: JQuery) => void; From dd01b06b7c193e818936614c27ecb771a06dcbe2 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Thu, 26 Jan 2017 06:37:59 -0800 Subject: [PATCH 48/54] Clarify why authors are mentioned. --- ISSUE_TEMPLATE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index 252df5994f..4078b4808b 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -1,4 +1,5 @@ - [ ] I tried using the `@types/xxxx` package and had problems. - [ ] I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript - [ ] I have a question that is inappropriate for [StackOverflow](https://stackoverflow.com/). (Please ask any appropriate questions there). -- The authors (see `Definitions by:` in `index.d.ts`) are cc/ @.... +- [ ] [Mention](https://github.com/blog/821-mention-somebody-they-re-notified) the authors (see `Definitions by:` in `index.d.ts`) so they can respond. + - Authors: @.... From 576836745347dc13351fdb0233c956b273e1aec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Elgaard=20Larsen?= Date: Thu, 26 Jan 2017 19:01:52 +0100 Subject: [PATCH 49/54] html-to-text: wordwrap option can be false/null According to documentation, the "wordwrap" option can be either a number, false, or null. --- html-to-text/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html-to-text/index.d.ts b/html-to-text/index.d.ts index ce02e4bfe5..406908a6ce 100644 --- a/html-to-text/index.d.ts +++ b/html-to-text/index.d.ts @@ -39,7 +39,7 @@ interface HtmlToTextOptions { * Defines after how many chars a line break should follow in p elements. * Set to null or false to disable word-wrapping. Default: 80 */ - wordwrap?: number; + wordwrap?: number | false | null; /** * Allows to select certain tables by the class or id attribute from the HTML From 66d3bd4a3cf9a31165485ea590d94aa0971facac Mon Sep 17 00:00:00 2001 From: Jacob Baskin Date: Thu, 26 Jan 2017 14:32:36 -0500 Subject: [PATCH 50/54] Add typings for moment-round --- moment-round/index.d.ts | 14 ++++++++++++++ moment-round/moment-round-tests.ts | 8 ++++++++ moment-round/tsconfig.json | 20 ++++++++++++++++++++ moment-round/tslint.json | 1 + 4 files changed, 43 insertions(+) create mode 100644 moment-round/index.d.ts create mode 100644 moment-round/moment-round-tests.ts create mode 100644 moment-round/tsconfig.json create mode 100644 moment-round/tslint.json diff --git a/moment-round/index.d.ts b/moment-round/index.d.ts new file mode 100644 index 0000000000..e68181ac34 --- /dev/null +++ b/moment-round/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for moment-round 1.0 +// Project: https://github.com/WebDevTmas/moment-round +// Definitions by: Jacob Baskin +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as moment from 'moment'; + +declare module 'moment' { + interface Moment { + round(precision: number, key: string, direction: 'round' | 'ceil' | 'floor'): Moment; + ceil(precision: number, key: string): Moment; + floor(precision: number, key: string): Moment; + } +} diff --git a/moment-round/moment-round-tests.ts b/moment-round/moment-round-tests.ts new file mode 100644 index 0000000000..6925966365 --- /dev/null +++ b/moment-round/moment-round-tests.ts @@ -0,0 +1,8 @@ +import * as moment from 'moment'; + +var m = new moment(); // 2015-06-18 15:30:19 +moment.round(5, 'seconds'); // 2015-06-18 15:30:20 +moment.ceil(3, 'minutes'); // 2015-06-18 15:33:00 +moment.floor(16, 'hours'); // 2015-06-18 00:00:00 +moment.ceil(21, 'hours'); // 2015-06-18 21:00:00 +moment.ceil(20, 'hours'); // 2015-06-19 00:00:00 diff --git a/moment-round/tsconfig.json b/moment-round/tsconfig.json new file mode 100644 index 0000000000..7054df992f --- /dev/null +++ b/moment-round/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "moment-round-tests.ts" + ] +} diff --git a/moment-round/tslint.json b/moment-round/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/moment-round/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } From f4a5b2bfb5d35876d87b9484762926f9e8c571a5 Mon Sep 17 00:00:00 2001 From: Jacob Baskin Date: Thu, 26 Jan 2017 14:36:39 -0500 Subject: [PATCH 51/54] Add 'export = moment' --- moment-round/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/moment-round/index.d.ts b/moment-round/index.d.ts index e68181ac34..8e6ac65cf5 100644 --- a/moment-round/index.d.ts +++ b/moment-round/index.d.ts @@ -5,6 +5,8 @@ import * as moment from 'moment'; +export = moment; + declare module 'moment' { interface Moment { round(precision: number, key: string, direction: 'round' | 'ceil' | 'floor'): Moment; From fab0c1b8dd929e38bc58f569149a34b153eec477 Mon Sep 17 00:00:00 2001 From: Jacob Baskin Date: Thu, 26 Jan 2017 14:43:58 -0500 Subject: [PATCH 52/54] Fix moment-round typings --- moment-round/index.d.ts | 2 +- moment-round/moment-round-tests.ts | 12 ++++++------ moment-round/package.json | 5 +++++ 3 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 moment-round/package.json diff --git a/moment-round/index.d.ts b/moment-round/index.d.ts index 8e6ac65cf5..441cec3f6f 100644 --- a/moment-round/index.d.ts +++ b/moment-round/index.d.ts @@ -9,7 +9,7 @@ export = moment; declare module 'moment' { interface Moment { - round(precision: number, key: string, direction: 'round' | 'ceil' | 'floor'): Moment; + round(precision: number, key: string, direction?: 'round' | 'ceil' | 'floor'): Moment; ceil(precision: number, key: string): Moment; floor(precision: number, key: string): Moment; } diff --git a/moment-round/moment-round-tests.ts b/moment-round/moment-round-tests.ts index 6925966365..063e3cbea4 100644 --- a/moment-round/moment-round-tests.ts +++ b/moment-round/moment-round-tests.ts @@ -1,8 +1,8 @@ import * as moment from 'moment'; -var m = new moment(); // 2015-06-18 15:30:19 -moment.round(5, 'seconds'); // 2015-06-18 15:30:20 -moment.ceil(3, 'minutes'); // 2015-06-18 15:33:00 -moment.floor(16, 'hours'); // 2015-06-18 00:00:00 -moment.ceil(21, 'hours'); // 2015-06-18 21:00:00 -moment.ceil(20, 'hours'); // 2015-06-19 00:00:00 +var m = moment(); +m.round(5, 'seconds'); +m.ceil(3, 'minutes'); +m.floor(16, 'hours'); +m.ceil(21, 'hours'); +m.ceil(20, 'hours'); diff --git a/moment-round/package.json b/moment-round/package.json new file mode 100644 index 0000000000..4c6d24a445 --- /dev/null +++ b/moment-round/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "moment": ">=2.14.0" + } +} \ No newline at end of file From c305081cf1e3d850559e146763f2cd34b4e0a080 Mon Sep 17 00:00:00 2001 From: Ben Herila Date: Thu, 26 Jan 2017 14:00:30 -0800 Subject: [PATCH 53/54] Update credit-card-type to support latest prefixPattern and exactPattern --- credit-card-type/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/credit-card-type/index.d.ts b/credit-card-type/index.d.ts index 59886b5e60..8625e5e5f8 100644 --- a/credit-card-type/index.d.ts +++ b/credit-card-type/index.d.ts @@ -10,7 +10,8 @@ declare namespace creditCardType { interface CreditCardTypeInfo { niceType?: string type?: CardBrand - pattern?: RegExp + prefixPattern?: RegExp + exactPattern?: RegExp gaps?: Array lengths?: Array code?: { From 2461ee114f7718677d6c369061e6ad946f517de2 Mon Sep 17 00:00:00 2001 From: Lukas Zech Date: Fri, 27 Jan 2017 18:29:09 +0100 Subject: [PATCH 54/54] Use PartialObject for object predicates in _.every, _.find and _.some (#13994) * Use PartialObject for object predicates * Add typescript version * Update lodash module generator and update modules to TypeScript 2.1 * Use Partial to define PartialObject, fix LodashStatic.find * Use PartialObject as predicate in lodash.filter * Add TS2.1 header to bookshelf, lodash-decorators, lodash-es, sequelize/v3, sequelize, sequelize-fixtures, and umzug --- bookshelf/index.d.ts | 1 + lodash-decorators/index.d.ts | 1 + lodash-es/index.d.ts | 1 + lodash.add/index.d.ts | 1 + lodash.after/index.d.ts | 1 + lodash.ary/index.d.ts | 1 + lodash.assign/index.d.ts | 1 + lodash.assignin/index.d.ts | 1 + lodash.assigninwith/index.d.ts | 1 + lodash.assignwith/index.d.ts | 1 + lodash.at/index.d.ts | 1 + lodash.attempt/index.d.ts | 1 + lodash.before/index.d.ts | 1 + lodash.bind/index.d.ts | 1 + lodash.bindall/index.d.ts | 1 + lodash.bindkey/index.d.ts | 1 + lodash.camelcase/index.d.ts | 1 + lodash.capitalize/index.d.ts | 1 + lodash.castarray/index.d.ts | 1 + lodash.ceil/index.d.ts | 1 + lodash.chunk/index.d.ts | 1 + lodash.clamp/index.d.ts | 1 + lodash.clone/index.d.ts | 1 + lodash.clonedeep/index.d.ts | 1 + lodash.clonedeepwith/index.d.ts | 1 + lodash.clonewith/index.d.ts | 1 + lodash.compact/index.d.ts | 1 + lodash.concat/index.d.ts | 1 + lodash.constant/index.d.ts | 1 + lodash.countby/index.d.ts | 1 + lodash.create/index.d.ts | 1 + lodash.curry/index.d.ts | 1 + lodash.curryright/index.d.ts | 1 + lodash.debounce/index.d.ts | 1 + lodash.deburr/index.d.ts | 1 + lodash.defaults/index.d.ts | 1 + lodash.defaultsdeep/index.d.ts | 1 + lodash.defer/index.d.ts | 1 + lodash.delay/index.d.ts | 1 + lodash.difference/index.d.ts | 1 + lodash.differenceby/index.d.ts | 1 + lodash.differencewith/index.d.ts | 1 + lodash.drop/index.d.ts | 1 + lodash.dropright/index.d.ts | 1 + lodash.droprightwhile/index.d.ts | 1 + lodash.dropwhile/index.d.ts | 1 + lodash.endswith/index.d.ts | 1 + lodash.eq/index.d.ts | 1 + lodash.escape/index.d.ts | 1 + lodash.escaperegexp/index.d.ts | 1 + lodash.every/index.d.ts | 1 + lodash.fill/index.d.ts | 1 + lodash.filter/index.d.ts | 1 + lodash.find/index.d.ts | 1 + lodash.findindex/index.d.ts | 1 + lodash.findkey/index.d.ts | 1 + lodash.findlast/index.d.ts | 1 + lodash.findlastindex/index.d.ts | 1 + lodash.findlastkey/index.d.ts | 1 + lodash.first/index.d.ts | 1 + lodash.flatmap/index.d.ts | 1 + lodash.flatten/index.d.ts | 1 + lodash.flattendeep/index.d.ts | 1 + lodash.flattendepth/index.d.ts | 1 + lodash.flip/index.d.ts | 1 + lodash.floor/index.d.ts | 1 + lodash.flow/index.d.ts | 1 + lodash.flowright/index.d.ts | 1 + lodash.foreach/index.d.ts | 1 + lodash.foreachright/index.d.ts | 1 + lodash.forin/index.d.ts | 1 + lodash.forinright/index.d.ts | 1 + lodash.forown/index.d.ts | 1 + lodash.forownright/index.d.ts | 1 + lodash.frompairs/index.d.ts | 1 + lodash.functions/index.d.ts | 1 + lodash.functionsin/index.d.ts | 1 + lodash.get/index.d.ts | 1 + lodash.groupby/index.d.ts | 1 + lodash.gt/index.d.ts | 1 + lodash.gte/index.d.ts | 1 + lodash.has/index.d.ts | 1 + lodash.hasin/index.d.ts | 1 + lodash.head/index.d.ts | 1 + lodash.identity/index.d.ts | 1 + lodash.includes/index.d.ts | 1 + lodash.indexof/index.d.ts | 1 + lodash.initial/index.d.ts | 1 + lodash.inrange/index.d.ts | 1 + lodash.intersection/index.d.ts | 1 + lodash.intersectionby/index.d.ts | 1 + lodash.intersectionwith/index.d.ts | 1 + lodash.invert/index.d.ts | 1 + lodash.invertby/index.d.ts | 1 + lodash.invoke/index.d.ts | 1 + lodash.invokemap/index.d.ts | 1 + lodash.isarguments/index.d.ts | 1 + lodash.isarray/index.d.ts | 1 + lodash.isarraybuffer/index.d.ts | 1 + lodash.isarraylike/index.d.ts | 1 + lodash.isarraylikeobject/index.d.ts | 1 + lodash.isboolean/index.d.ts | 1 + lodash.isbuffer/index.d.ts | 1 + lodash.isdate/index.d.ts | 1 + lodash.iselement/index.d.ts | 1 + lodash.isempty/index.d.ts | 1 + lodash.isequal/index.d.ts | 3 +- lodash.isequalwith/index.d.ts | 1 + lodash.iserror/index.d.ts | 1 + lodash.isfinite/index.d.ts | 1 + lodash.isfunction/index.d.ts | 1 + lodash.isinteger/index.d.ts | 1 + lodash.islength/index.d.ts | 1 + lodash.ismap/index.d.ts | 1 + lodash.ismatch/index.d.ts | 1 + lodash.ismatchwith/index.d.ts | 1 + lodash.isnan/index.d.ts | 1 + lodash.isnative/index.d.ts | 1 + lodash.isnil/index.d.ts | 1 + lodash.isnull/index.d.ts | 1 + lodash.isnumber/index.d.ts | 1 + lodash.isobject/index.d.ts | 1 + lodash.isobjectlike/index.d.ts | 1 + lodash.isplainobject/index.d.ts | 1 + lodash.isregexp/index.d.ts | 1 + lodash.issafeinteger/index.d.ts | 1 + lodash.isset/index.d.ts | 1 + lodash.isstring/index.d.ts | 1 + lodash.issymbol/index.d.ts | 1 + lodash.istypedarray/index.d.ts | 1 + lodash.isundefined/index.d.ts | 1 + lodash.isweakmap/index.d.ts | 1 + lodash.isweakset/index.d.ts | 1 + lodash.iteratee/index.d.ts | 1 + lodash.join/index.d.ts | 1 + lodash.kebabcase/index.d.ts | 1 + lodash.keyby/index.d.ts | 1 + lodash.keys/index.d.ts | 1 + lodash.keysin/index.d.ts | 1 + lodash.last/index.d.ts | 1 + lodash.lastindexof/index.d.ts | 1 + lodash.lowercase/index.d.ts | 1 + lodash.lowerfirst/index.d.ts | 1 + lodash.lt/index.d.ts | 1 + lodash.lte/index.d.ts | 1 + lodash.mapkeys/index.d.ts | 1 + lodash.mapvalues/index.d.ts | 1 + lodash.matches/index.d.ts | 1 + lodash.matchesproperty/index.d.ts | 1 + lodash.max/index.d.ts | 1 + lodash.maxby/index.d.ts | 1 + lodash.mean/index.d.ts | 1 + lodash.meanby/index.d.ts | 8 ++ lodash.meanby/tsconfig.json | 19 +++++ lodash.meanby/tslint.json | 3 + lodash.memoize/index.d.ts | 1 + lodash.merge/index.d.ts | 1 + lodash.mergewith/index.d.ts | 1 + lodash.method/index.d.ts | 1 + lodash.methodof/index.d.ts | 1 + lodash.min/index.d.ts | 1 + lodash.minby/index.d.ts | 1 + lodash.mixin/index.d.ts | 1 + lodash.negate/index.d.ts | 1 + lodash.noop/index.d.ts | 1 + lodash.now/index.d.ts | 1 + lodash.ntharg/index.d.ts | 1 + lodash.omit/index.d.ts | 1 + lodash.omitby/index.d.ts | 1 + lodash.once/index.d.ts | 1 + lodash.orderby/index.d.ts | 1 + lodash.over/index.d.ts | 1 + lodash.overargs/index.d.ts | 1 + lodash.overevery/index.d.ts | 1 + lodash.oversome/index.d.ts | 1 + lodash.pad/index.d.ts | 1 + lodash.padend/index.d.ts | 1 + lodash.padstart/index.d.ts | 1 + lodash.parseint/index.d.ts | 1 + lodash.partial/index.d.ts | 1 + lodash.partialright/index.d.ts | 1 + lodash.partition/index.d.ts | 1 + lodash.pick/index.d.ts | 1 + lodash.pickby/index.d.ts | 1 + lodash.property/index.d.ts | 1 + lodash.propertyof/index.d.ts | 1 + lodash.pull/index.d.ts | 1 + lodash.pullall/index.d.ts | 1 + lodash.pullallby/index.d.ts | 1 + lodash.pullat/index.d.ts | 1 + lodash.random/index.d.ts | 1 + lodash.range/index.d.ts | 1 + lodash.rangeright/index.d.ts | 1 + lodash.rearg/index.d.ts | 1 + lodash.reduce/index.d.ts | 1 + lodash.reduceright/index.d.ts | 1 + lodash.reject/index.d.ts | 1 + lodash.remove/index.d.ts | 1 + lodash.repeat/index.d.ts | 1 + lodash.replace/index.d.ts | 1 + lodash.rest/index.d.ts | 1 + lodash.result/index.d.ts | 1 + lodash.reverse/index.d.ts | 1 + lodash.round/index.d.ts | 1 + lodash.sample/index.d.ts | 1 + lodash.samplesize/index.d.ts | 1 + lodash.set/index.d.ts | 1 + lodash.setwith/index.d.ts | 1 + lodash.shuffle/index.d.ts | 1 + lodash.size/index.d.ts | 1 + lodash.slice/index.d.ts | 1 + lodash.snakecase/index.d.ts | 1 + lodash.some/index.d.ts | 1 + lodash.sortby/index.d.ts | 1 + lodash.sortedindex/index.d.ts | 1 + lodash.sortedindexby/index.d.ts | 1 + lodash.sortedindexof/index.d.ts | 1 + lodash.sortedlastindex/index.d.ts | 1 + lodash.sortedlastindexby/index.d.ts | 1 + lodash.sortedlastindexof/index.d.ts | 1 + lodash.sorteduniq/index.d.ts | 1 + lodash.sorteduniqby/index.d.ts | 1 + lodash.split/index.d.ts | 1 + lodash.spread/index.d.ts | 1 + lodash.startcase/index.d.ts | 1 + lodash.startswith/index.d.ts | 1 + lodash.subtract/index.d.ts | 1 + lodash.sum/index.d.ts | 1 + lodash.sumby/index.d.ts | 1 + lodash.tail/index.d.ts | 1 + lodash.take/index.d.ts | 1 + lodash.takeright/index.d.ts | 1 + lodash.takerightwhile/index.d.ts | 1 + lodash.takewhile/index.d.ts | 1 + lodash.template/index.d.ts | 1 + lodash.throttle/index.d.ts | 1 + lodash.times/index.d.ts | 1 + lodash.toarray/index.d.ts | 1 + lodash.tointeger/index.d.ts | 1 + lodash.tolength/index.d.ts | 1 + lodash.tolower/index.d.ts | 1 + lodash.tonumber/index.d.ts | 1 + lodash.topairs/index.d.ts | 1 + lodash.topairsin/index.d.ts | 1 + lodash.topath/index.d.ts | 1 + lodash.toplainobject/index.d.ts | 1 + lodash.tosafeinteger/index.d.ts | 1 + lodash.tostring/index.d.ts | 1 + lodash.toupper/index.d.ts | 1 + lodash.transform/index.d.ts | 1 + lodash.trim/index.d.ts | 1 + lodash.trimend/index.d.ts | 1 + lodash.trimstart/index.d.ts | 1 + lodash.truncate/index.d.ts | 1 + lodash.unary/index.d.ts | 1 + lodash.unescape/index.d.ts | 1 + lodash.union/index.d.ts | 1 + lodash.unionby/index.d.ts | 1 + lodash.unionwith/index.d.ts | 1 + lodash.uniq/index.d.ts | 1 + lodash.uniqby/index.d.ts | 1 + lodash.uniqueid/index.d.ts | 1 + lodash.uniqwith/index.d.ts | 1 + lodash.unset/index.d.ts | 1 + lodash.unzip/index.d.ts | 1 + lodash.unzipwith/index.d.ts | 1 + lodash.update/index.d.ts | 1 + lodash.uppercase/index.d.ts | 1 + lodash.upperfirst/index.d.ts | 1 + lodash.values/index.d.ts | 1 + lodash.valuesin/index.d.ts | 1 + lodash.without/index.d.ts | 1 + lodash.words/index.d.ts | 1 + lodash.wrap/index.d.ts | 1 + lodash.xor/index.d.ts | 1 + lodash.xorby/index.d.ts | 1 + lodash.xorwith/index.d.ts | 1 + lodash.zip/index.d.ts | 1 + lodash.zipobject/index.d.ts | 1 + lodash.zipwith/index.d.ts | 1 + lodash/index.d.ts | 74 +++++++++-------- lodash/lodash-tests.ts | 92 ++++++++++----------- lodash/meanBy/index.d.ts | 5 +- lodash/scripts/generate-modules.ts | 119 ++++++++++++++++++++++++++-- lodash/scripts/tsconfig.json | 10 +++ sequelize-fixtures/index.d.ts | 1 + sequelize/index.d.ts | 1 + sequelize/v3/index.d.ts | 1 + umzug/index.d.ts | 1 + 289 files changed, 522 insertions(+), 91 deletions(-) create mode 100644 lodash.meanby/index.d.ts create mode 100644 lodash.meanby/tsconfig.json create mode 100644 lodash.meanby/tslint.json create mode 100644 lodash/scripts/tsconfig.json diff --git a/bookshelf/index.d.ts b/bookshelf/index.d.ts index 3895ef95a1..56472a3213 100644 --- a/bookshelf/index.d.ts +++ b/bookshelf/index.d.ts @@ -2,6 +2,7 @@ // Project: http://bookshelfjs.org/ // Definitions by: Andrew Schurman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import Knex = require('knex'); import knex = require('knex'); diff --git a/lodash-decorators/index.d.ts b/lodash-decorators/index.d.ts index 0e0b8d9e3c..eb05886150 100644 --- a/lodash-decorators/index.d.ts +++ b/lodash-decorators/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/steelsojka/lodash-decorators // Definitions by: Qubo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 /// diff --git a/lodash-es/index.d.ts b/lodash-es/index.d.ts index 71f98587ff..1c9e42c18e 100644 --- a/lodash-es/index.d.ts +++ b/lodash-es/index.d.ts @@ -2,3 +2,4 @@ // Project: http://lodash.com/ // Definitions by: Stephen Lautier // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 \ No newline at end of file diff --git a/lodash.add/index.d.ts b/lodash.add/index.d.ts index 0a9aecd185..76c74086e3 100644 --- a/lodash.add/index.d.ts +++ b/lodash.add/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { add } from "lodash"; export = add; diff --git a/lodash.after/index.d.ts b/lodash.after/index.d.ts index 52f5efd8e1..7ba8e38a1a 100644 --- a/lodash.after/index.d.ts +++ b/lodash.after/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { after } from "lodash"; export = after; diff --git a/lodash.ary/index.d.ts b/lodash.ary/index.d.ts index d78cd0c60e..fe902df0d0 100644 --- a/lodash.ary/index.d.ts +++ b/lodash.ary/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { ary } from "lodash"; export = ary; diff --git a/lodash.assign/index.d.ts b/lodash.assign/index.d.ts index 0558933c3f..8da5d220bf 100644 --- a/lodash.assign/index.d.ts +++ b/lodash.assign/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { assign } from "lodash"; export = assign; diff --git a/lodash.assignin/index.d.ts b/lodash.assignin/index.d.ts index 7e8740aea3..50551ff9d7 100644 --- a/lodash.assignin/index.d.ts +++ b/lodash.assignin/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { assignIn } from "lodash"; export = assignIn; diff --git a/lodash.assigninwith/index.d.ts b/lodash.assigninwith/index.d.ts index 1e1e3189c1..76f3d2dede 100644 --- a/lodash.assigninwith/index.d.ts +++ b/lodash.assigninwith/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { assignInWith } from "lodash"; export = assignInWith; diff --git a/lodash.assignwith/index.d.ts b/lodash.assignwith/index.d.ts index 02e395824d..a01c36eb29 100644 --- a/lodash.assignwith/index.d.ts +++ b/lodash.assignwith/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { assignWith } from "lodash"; export = assignWith; diff --git a/lodash.at/index.d.ts b/lodash.at/index.d.ts index 7b237c170b..061d6040b8 100644 --- a/lodash.at/index.d.ts +++ b/lodash.at/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { at } from "lodash"; export = at; diff --git a/lodash.attempt/index.d.ts b/lodash.attempt/index.d.ts index a93d1efb06..52874b4372 100644 --- a/lodash.attempt/index.d.ts +++ b/lodash.attempt/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { attempt } from "lodash"; export = attempt; diff --git a/lodash.before/index.d.ts b/lodash.before/index.d.ts index 50456ca93b..3c211206c0 100644 --- a/lodash.before/index.d.ts +++ b/lodash.before/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { before } from "lodash"; export = before; diff --git a/lodash.bind/index.d.ts b/lodash.bind/index.d.ts index 2ace06a403..eda3868cae 100644 --- a/lodash.bind/index.d.ts +++ b/lodash.bind/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { bind } from "lodash"; export = bind; diff --git a/lodash.bindall/index.d.ts b/lodash.bindall/index.d.ts index 7d5b08e79e..9a80f928cc 100644 --- a/lodash.bindall/index.d.ts +++ b/lodash.bindall/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { bindAll } from "lodash"; export = bindAll; diff --git a/lodash.bindkey/index.d.ts b/lodash.bindkey/index.d.ts index 581f950cc1..a7ecab5dd1 100644 --- a/lodash.bindkey/index.d.ts +++ b/lodash.bindkey/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { bindKey } from "lodash"; export = bindKey; diff --git a/lodash.camelcase/index.d.ts b/lodash.camelcase/index.d.ts index 7e330178df..b489f3f7a5 100644 --- a/lodash.camelcase/index.d.ts +++ b/lodash.camelcase/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { camelCase } from "lodash"; export = camelCase; diff --git a/lodash.capitalize/index.d.ts b/lodash.capitalize/index.d.ts index 5cdfce9f64..06a3f72fd4 100644 --- a/lodash.capitalize/index.d.ts +++ b/lodash.capitalize/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { capitalize } from "lodash"; export = capitalize; diff --git a/lodash.castarray/index.d.ts b/lodash.castarray/index.d.ts index 468ae08464..2d77145a0c 100644 --- a/lodash.castarray/index.d.ts +++ b/lodash.castarray/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { castArray } from "lodash"; export = castArray; diff --git a/lodash.ceil/index.d.ts b/lodash.ceil/index.d.ts index 382e7c6452..4d91e60e65 100644 --- a/lodash.ceil/index.d.ts +++ b/lodash.ceil/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { ceil } from "lodash"; export = ceil; diff --git a/lodash.chunk/index.d.ts b/lodash.chunk/index.d.ts index 9fd9a55c59..ffd11b71b2 100644 --- a/lodash.chunk/index.d.ts +++ b/lodash.chunk/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { chunk } from "lodash"; export = chunk; diff --git a/lodash.clamp/index.d.ts b/lodash.clamp/index.d.ts index 58372494cd..0a28f04829 100644 --- a/lodash.clamp/index.d.ts +++ b/lodash.clamp/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { clamp } from "lodash"; export = clamp; diff --git a/lodash.clone/index.d.ts b/lodash.clone/index.d.ts index b9fa987104..a2d6e34490 100644 --- a/lodash.clone/index.d.ts +++ b/lodash.clone/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { clone } from "lodash"; export = clone; diff --git a/lodash.clonedeep/index.d.ts b/lodash.clonedeep/index.d.ts index 4bd178bff0..5e9382e296 100644 --- a/lodash.clonedeep/index.d.ts +++ b/lodash.clonedeep/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { cloneDeep } from "lodash"; export = cloneDeep; diff --git a/lodash.clonedeepwith/index.d.ts b/lodash.clonedeepwith/index.d.ts index e014c80686..80439cef54 100644 --- a/lodash.clonedeepwith/index.d.ts +++ b/lodash.clonedeepwith/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { cloneDeepWith } from "lodash"; export = cloneDeepWith; diff --git a/lodash.clonewith/index.d.ts b/lodash.clonewith/index.d.ts index cb29709538..bdaa109a3a 100644 --- a/lodash.clonewith/index.d.ts +++ b/lodash.clonewith/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { cloneWith } from "lodash"; export = cloneWith; diff --git a/lodash.compact/index.d.ts b/lodash.compact/index.d.ts index d6dc0b2fb8..9af681aeb4 100644 --- a/lodash.compact/index.d.ts +++ b/lodash.compact/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { compact } from "lodash"; export = compact; diff --git a/lodash.concat/index.d.ts b/lodash.concat/index.d.ts index dd6f9bb6e2..692dfa5aab 100644 --- a/lodash.concat/index.d.ts +++ b/lodash.concat/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { concat } from "lodash"; export = concat; diff --git a/lodash.constant/index.d.ts b/lodash.constant/index.d.ts index 92fc209518..1b941af3ad 100644 --- a/lodash.constant/index.d.ts +++ b/lodash.constant/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { constant } from "lodash"; export = constant; diff --git a/lodash.countby/index.d.ts b/lodash.countby/index.d.ts index a3c6d24d93..03940a5e7d 100644 --- a/lodash.countby/index.d.ts +++ b/lodash.countby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { countBy } from "lodash"; export = countBy; diff --git a/lodash.create/index.d.ts b/lodash.create/index.d.ts index 5ca15075eb..e9d553be1c 100644 --- a/lodash.create/index.d.ts +++ b/lodash.create/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { create } from "lodash"; export = create; diff --git a/lodash.curry/index.d.ts b/lodash.curry/index.d.ts index 61f26316fd..a613fce91a 100644 --- a/lodash.curry/index.d.ts +++ b/lodash.curry/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { curry } from "lodash"; export = curry; diff --git a/lodash.curryright/index.d.ts b/lodash.curryright/index.d.ts index caf7dfcfe3..b16fdd5147 100644 --- a/lodash.curryright/index.d.ts +++ b/lodash.curryright/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { curryRight } from "lodash"; export = curryRight; diff --git a/lodash.debounce/index.d.ts b/lodash.debounce/index.d.ts index 2bef22974b..4e4e3aec55 100644 --- a/lodash.debounce/index.d.ts +++ b/lodash.debounce/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { debounce } from "lodash"; export = debounce; diff --git a/lodash.deburr/index.d.ts b/lodash.deburr/index.d.ts index 6f92fcbbd4..0caa30be24 100644 --- a/lodash.deburr/index.d.ts +++ b/lodash.deburr/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { deburr } from "lodash"; export = deburr; diff --git a/lodash.defaults/index.d.ts b/lodash.defaults/index.d.ts index 15c8e57184..6c0bb1b47b 100644 --- a/lodash.defaults/index.d.ts +++ b/lodash.defaults/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { defaults } from "lodash"; export = defaults; diff --git a/lodash.defaultsdeep/index.d.ts b/lodash.defaultsdeep/index.d.ts index 22cb0667a3..c552b805ff 100644 --- a/lodash.defaultsdeep/index.d.ts +++ b/lodash.defaultsdeep/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { defaultsDeep } from "lodash"; export = defaultsDeep; diff --git a/lodash.defer/index.d.ts b/lodash.defer/index.d.ts index ad67ed0c82..6c35dd7513 100644 --- a/lodash.defer/index.d.ts +++ b/lodash.defer/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { defer } from "lodash"; export = defer; diff --git a/lodash.delay/index.d.ts b/lodash.delay/index.d.ts index b65bd46abe..bb4922c81c 100644 --- a/lodash.delay/index.d.ts +++ b/lodash.delay/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { delay } from "lodash"; export = delay; diff --git a/lodash.difference/index.d.ts b/lodash.difference/index.d.ts index 38aa798be1..7ad8c6c414 100644 --- a/lodash.difference/index.d.ts +++ b/lodash.difference/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { difference } from "lodash"; export = difference; diff --git a/lodash.differenceby/index.d.ts b/lodash.differenceby/index.d.ts index 2d0c4859f0..50dfcd6a9c 100644 --- a/lodash.differenceby/index.d.ts +++ b/lodash.differenceby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { differenceBy } from "lodash"; export = differenceBy; diff --git a/lodash.differencewith/index.d.ts b/lodash.differencewith/index.d.ts index fff454ca64..9870768137 100644 --- a/lodash.differencewith/index.d.ts +++ b/lodash.differencewith/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { differenceWith } from "lodash"; export = differenceWith; diff --git a/lodash.drop/index.d.ts b/lodash.drop/index.d.ts index 0605e176ec..f702675717 100644 --- a/lodash.drop/index.d.ts +++ b/lodash.drop/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { drop } from "lodash"; export = drop; diff --git a/lodash.dropright/index.d.ts b/lodash.dropright/index.d.ts index 1322022901..1385005315 100644 --- a/lodash.dropright/index.d.ts +++ b/lodash.dropright/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { dropRight } from "lodash"; export = dropRight; diff --git a/lodash.droprightwhile/index.d.ts b/lodash.droprightwhile/index.d.ts index b5fd1a75d2..02f5d13ac8 100644 --- a/lodash.droprightwhile/index.d.ts +++ b/lodash.droprightwhile/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { dropRightWhile } from "lodash"; export = dropRightWhile; diff --git a/lodash.dropwhile/index.d.ts b/lodash.dropwhile/index.d.ts index e24e46bccc..270e0d0189 100644 --- a/lodash.dropwhile/index.d.ts +++ b/lodash.dropwhile/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { dropWhile } from "lodash"; export = dropWhile; diff --git a/lodash.endswith/index.d.ts b/lodash.endswith/index.d.ts index 191301b21e..3a1c9b314e 100644 --- a/lodash.endswith/index.d.ts +++ b/lodash.endswith/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { endsWith } from "lodash"; export = endsWith; diff --git a/lodash.eq/index.d.ts b/lodash.eq/index.d.ts index 87e927aa6d..8af8729bb4 100644 --- a/lodash.eq/index.d.ts +++ b/lodash.eq/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { eq } from "lodash"; export = eq; diff --git a/lodash.escape/index.d.ts b/lodash.escape/index.d.ts index 8e72963f22..a74f554830 100644 --- a/lodash.escape/index.d.ts +++ b/lodash.escape/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { escape } from "lodash"; export = escape; diff --git a/lodash.escaperegexp/index.d.ts b/lodash.escaperegexp/index.d.ts index 19eb0c6807..b80f492f70 100644 --- a/lodash.escaperegexp/index.d.ts +++ b/lodash.escaperegexp/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { escapeRegExp } from "lodash"; export = escapeRegExp; diff --git a/lodash.every/index.d.ts b/lodash.every/index.d.ts index a7ce29ad7a..84fd71115a 100644 --- a/lodash.every/index.d.ts +++ b/lodash.every/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { every } from "lodash"; export = every; diff --git a/lodash.fill/index.d.ts b/lodash.fill/index.d.ts index 1c8c619422..c2b785fbe5 100644 --- a/lodash.fill/index.d.ts +++ b/lodash.fill/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { fill } from "lodash"; export = fill; diff --git a/lodash.filter/index.d.ts b/lodash.filter/index.d.ts index 83dd5a1ddb..4960ebde70 100644 --- a/lodash.filter/index.d.ts +++ b/lodash.filter/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { filter } from "lodash"; export = filter; diff --git a/lodash.find/index.d.ts b/lodash.find/index.d.ts index eda8769f54..f1d736f0c0 100644 --- a/lodash.find/index.d.ts +++ b/lodash.find/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { find } from "lodash"; export = find; diff --git a/lodash.findindex/index.d.ts b/lodash.findindex/index.d.ts index bfb5034785..bc2fee9d18 100644 --- a/lodash.findindex/index.d.ts +++ b/lodash.findindex/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { findIndex } from "lodash"; export = findIndex; diff --git a/lodash.findkey/index.d.ts b/lodash.findkey/index.d.ts index bf5c2a357c..4bca193179 100644 --- a/lodash.findkey/index.d.ts +++ b/lodash.findkey/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { findKey } from "lodash"; export = findKey; diff --git a/lodash.findlast/index.d.ts b/lodash.findlast/index.d.ts index ad5f1d00f9..7ec89440be 100644 --- a/lodash.findlast/index.d.ts +++ b/lodash.findlast/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { findLast } from "lodash"; export = findLast; diff --git a/lodash.findlastindex/index.d.ts b/lodash.findlastindex/index.d.ts index 6e771c3842..37c0ba4567 100644 --- a/lodash.findlastindex/index.d.ts +++ b/lodash.findlastindex/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { findLastIndex } from "lodash"; export = findLastIndex; diff --git a/lodash.findlastkey/index.d.ts b/lodash.findlastkey/index.d.ts index ea09517b83..6e53f08733 100644 --- a/lodash.findlastkey/index.d.ts +++ b/lodash.findlastkey/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { findLastKey } from "lodash"; export = findLastKey; diff --git a/lodash.first/index.d.ts b/lodash.first/index.d.ts index b1e1b84a54..21b7337178 100644 --- a/lodash.first/index.d.ts +++ b/lodash.first/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { first } from "lodash"; export = first; diff --git a/lodash.flatmap/index.d.ts b/lodash.flatmap/index.d.ts index 26d291b7bc..075c3eba57 100644 --- a/lodash.flatmap/index.d.ts +++ b/lodash.flatmap/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { flatMap } from "lodash"; export = flatMap; diff --git a/lodash.flatten/index.d.ts b/lodash.flatten/index.d.ts index 4c3d68eb5e..b0247fd668 100644 --- a/lodash.flatten/index.d.ts +++ b/lodash.flatten/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { flatten } from "lodash"; export = flatten; diff --git a/lodash.flattendeep/index.d.ts b/lodash.flattendeep/index.d.ts index 4e6b573eae..b596ff5fad 100644 --- a/lodash.flattendeep/index.d.ts +++ b/lodash.flattendeep/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { flattenDeep } from "lodash"; export = flattenDeep; diff --git a/lodash.flattendepth/index.d.ts b/lodash.flattendepth/index.d.ts index 186641d1bc..d8df8b242b 100644 --- a/lodash.flattendepth/index.d.ts +++ b/lodash.flattendepth/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { flattenDepth } from "lodash"; export = flattenDepth; diff --git a/lodash.flip/index.d.ts b/lodash.flip/index.d.ts index d4a69991ab..a87354fe7d 100644 --- a/lodash.flip/index.d.ts +++ b/lodash.flip/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { flip } from "lodash"; export = flip; diff --git a/lodash.floor/index.d.ts b/lodash.floor/index.d.ts index 7e43e4335b..ca831b6e0f 100644 --- a/lodash.floor/index.d.ts +++ b/lodash.floor/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { floor } from "lodash"; export = floor; diff --git a/lodash.flow/index.d.ts b/lodash.flow/index.d.ts index 36be0e704f..d2bc98d1ab 100644 --- a/lodash.flow/index.d.ts +++ b/lodash.flow/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { flow } from "lodash"; export = flow; diff --git a/lodash.flowright/index.d.ts b/lodash.flowright/index.d.ts index 95189e5684..e1275db957 100644 --- a/lodash.flowright/index.d.ts +++ b/lodash.flowright/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { flowRight } from "lodash"; export = flowRight; diff --git a/lodash.foreach/index.d.ts b/lodash.foreach/index.d.ts index d2fd5757b4..9aec8eaf2b 100644 --- a/lodash.foreach/index.d.ts +++ b/lodash.foreach/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { forEach } from "lodash"; export = forEach; diff --git a/lodash.foreachright/index.d.ts b/lodash.foreachright/index.d.ts index cdd20d5fec..147f43d771 100644 --- a/lodash.foreachright/index.d.ts +++ b/lodash.foreachright/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { forEachRight } from "lodash"; export = forEachRight; diff --git a/lodash.forin/index.d.ts b/lodash.forin/index.d.ts index e95e69f8b4..af03a8a4e1 100644 --- a/lodash.forin/index.d.ts +++ b/lodash.forin/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { forIn } from "lodash"; export = forIn; diff --git a/lodash.forinright/index.d.ts b/lodash.forinright/index.d.ts index 160f182cf9..c79a18f746 100644 --- a/lodash.forinright/index.d.ts +++ b/lodash.forinright/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { forInRight } from "lodash"; export = forInRight; diff --git a/lodash.forown/index.d.ts b/lodash.forown/index.d.ts index 20ae037f37..32d2ac758d 100644 --- a/lodash.forown/index.d.ts +++ b/lodash.forown/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { forOwn } from "lodash"; export = forOwn; diff --git a/lodash.forownright/index.d.ts b/lodash.forownright/index.d.ts index 0736346722..1a2ff70788 100644 --- a/lodash.forownright/index.d.ts +++ b/lodash.forownright/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { forOwnRight } from "lodash"; export = forOwnRight; diff --git a/lodash.frompairs/index.d.ts b/lodash.frompairs/index.d.ts index db158444d5..b74020f99f 100644 --- a/lodash.frompairs/index.d.ts +++ b/lodash.frompairs/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { fromPairs } from "lodash"; export = fromPairs; diff --git a/lodash.functions/index.d.ts b/lodash.functions/index.d.ts index 03ca7febbb..865f3c0c1e 100644 --- a/lodash.functions/index.d.ts +++ b/lodash.functions/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { functions } from "lodash"; export = functions; diff --git a/lodash.functionsin/index.d.ts b/lodash.functionsin/index.d.ts index 93168e67a3..5bfc7a5ca2 100644 --- a/lodash.functionsin/index.d.ts +++ b/lodash.functionsin/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { functionsIn } from "lodash"; export = functionsIn; diff --git a/lodash.get/index.d.ts b/lodash.get/index.d.ts index 91e6b74e66..fd7d336a70 100644 --- a/lodash.get/index.d.ts +++ b/lodash.get/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { get } from "lodash"; export = get; diff --git a/lodash.groupby/index.d.ts b/lodash.groupby/index.d.ts index 06156f9b00..c55d2e3db7 100644 --- a/lodash.groupby/index.d.ts +++ b/lodash.groupby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { groupBy } from "lodash"; export = groupBy; diff --git a/lodash.gt/index.d.ts b/lodash.gt/index.d.ts index f541f408a8..cd5aa96019 100644 --- a/lodash.gt/index.d.ts +++ b/lodash.gt/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { gt } from "lodash"; export = gt; diff --git a/lodash.gte/index.d.ts b/lodash.gte/index.d.ts index 4041863b22..0e9eb62a7c 100644 --- a/lodash.gte/index.d.ts +++ b/lodash.gte/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { gte } from "lodash"; export = gte; diff --git a/lodash.has/index.d.ts b/lodash.has/index.d.ts index aaf4c27353..28ee7cd4e9 100644 --- a/lodash.has/index.d.ts +++ b/lodash.has/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { has } from "lodash"; export = has; diff --git a/lodash.hasin/index.d.ts b/lodash.hasin/index.d.ts index 53052f5cc3..09be59f7da 100644 --- a/lodash.hasin/index.d.ts +++ b/lodash.hasin/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { hasIn } from "lodash"; export = hasIn; diff --git a/lodash.head/index.d.ts b/lodash.head/index.d.ts index d2e3e06eac..0b3b6da94f 100644 --- a/lodash.head/index.d.ts +++ b/lodash.head/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { head } from "lodash"; export = head; diff --git a/lodash.identity/index.d.ts b/lodash.identity/index.d.ts index 810313857d..0e683ed1c4 100644 --- a/lodash.identity/index.d.ts +++ b/lodash.identity/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { identity } from "lodash"; export = identity; diff --git a/lodash.includes/index.d.ts b/lodash.includes/index.d.ts index dccbc5e3ee..ddb703d38d 100644 --- a/lodash.includes/index.d.ts +++ b/lodash.includes/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { includes } from "lodash"; export = includes; diff --git a/lodash.indexof/index.d.ts b/lodash.indexof/index.d.ts index 0551b9acc6..180fde9e2f 100644 --- a/lodash.indexof/index.d.ts +++ b/lodash.indexof/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { indexOf } from "lodash"; export = indexOf; diff --git a/lodash.initial/index.d.ts b/lodash.initial/index.d.ts index 303d425de1..40fec082f7 100644 --- a/lodash.initial/index.d.ts +++ b/lodash.initial/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { initial } from "lodash"; export = initial; diff --git a/lodash.inrange/index.d.ts b/lodash.inrange/index.d.ts index b65ff730db..8140966ac2 100644 --- a/lodash.inrange/index.d.ts +++ b/lodash.inrange/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { inRange } from "lodash"; export = inRange; diff --git a/lodash.intersection/index.d.ts b/lodash.intersection/index.d.ts index 8bc7dbde4f..149a324277 100644 --- a/lodash.intersection/index.d.ts +++ b/lodash.intersection/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { intersection } from "lodash"; export = intersection; diff --git a/lodash.intersectionby/index.d.ts b/lodash.intersectionby/index.d.ts index 74ae5d4dfc..81c206df48 100644 --- a/lodash.intersectionby/index.d.ts +++ b/lodash.intersectionby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { intersectionBy } from "lodash"; export = intersectionBy; diff --git a/lodash.intersectionwith/index.d.ts b/lodash.intersectionwith/index.d.ts index 73b816b192..e18b9d41ff 100644 --- a/lodash.intersectionwith/index.d.ts +++ b/lodash.intersectionwith/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { intersectionWith } from "lodash"; export = intersectionWith; diff --git a/lodash.invert/index.d.ts b/lodash.invert/index.d.ts index 99fdb04c76..25fe9ce360 100644 --- a/lodash.invert/index.d.ts +++ b/lodash.invert/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { invert } from "lodash"; export = invert; diff --git a/lodash.invertby/index.d.ts b/lodash.invertby/index.d.ts index c3959934a2..63e5c70405 100644 --- a/lodash.invertby/index.d.ts +++ b/lodash.invertby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { invertBy } from "lodash"; export = invertBy; diff --git a/lodash.invoke/index.d.ts b/lodash.invoke/index.d.ts index 7af1475a29..e16b07d462 100644 --- a/lodash.invoke/index.d.ts +++ b/lodash.invoke/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { invoke } from "lodash"; export = invoke; diff --git a/lodash.invokemap/index.d.ts b/lodash.invokemap/index.d.ts index 4995018391..1365a4f752 100644 --- a/lodash.invokemap/index.d.ts +++ b/lodash.invokemap/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { invokeMap } from "lodash"; export = invokeMap; diff --git a/lodash.isarguments/index.d.ts b/lodash.isarguments/index.d.ts index f46218acd9..7eb30e26dd 100644 --- a/lodash.isarguments/index.d.ts +++ b/lodash.isarguments/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isArguments } from "lodash"; export = isArguments; diff --git a/lodash.isarray/index.d.ts b/lodash.isarray/index.d.ts index a777294028..d4df88d8d7 100644 --- a/lodash.isarray/index.d.ts +++ b/lodash.isarray/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isArray } from "lodash"; export = isArray; diff --git a/lodash.isarraybuffer/index.d.ts b/lodash.isarraybuffer/index.d.ts index 827727c372..bb65311721 100644 --- a/lodash.isarraybuffer/index.d.ts +++ b/lodash.isarraybuffer/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isArrayBuffer } from "lodash"; export = isArrayBuffer; diff --git a/lodash.isarraylike/index.d.ts b/lodash.isarraylike/index.d.ts index 44e0da10d2..e722669eb4 100644 --- a/lodash.isarraylike/index.d.ts +++ b/lodash.isarraylike/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isArrayLike } from "lodash"; export = isArrayLike; diff --git a/lodash.isarraylikeobject/index.d.ts b/lodash.isarraylikeobject/index.d.ts index e5a2a5d847..8d094d8261 100644 --- a/lodash.isarraylikeobject/index.d.ts +++ b/lodash.isarraylikeobject/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isArrayLikeObject } from "lodash"; export = isArrayLikeObject; diff --git a/lodash.isboolean/index.d.ts b/lodash.isboolean/index.d.ts index 39ae1338ee..38bcb53406 100644 --- a/lodash.isboolean/index.d.ts +++ b/lodash.isboolean/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isBoolean } from "lodash"; export = isBoolean; diff --git a/lodash.isbuffer/index.d.ts b/lodash.isbuffer/index.d.ts index 985ce28952..0c9d922967 100644 --- a/lodash.isbuffer/index.d.ts +++ b/lodash.isbuffer/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isBuffer } from "lodash"; export = isBuffer; diff --git a/lodash.isdate/index.d.ts b/lodash.isdate/index.d.ts index 0c59a7a05f..bc61921489 100644 --- a/lodash.isdate/index.d.ts +++ b/lodash.isdate/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isDate } from "lodash"; export = isDate; diff --git a/lodash.iselement/index.d.ts b/lodash.iselement/index.d.ts index d4538e9e40..e059b8b1f5 100644 --- a/lodash.iselement/index.d.ts +++ b/lodash.iselement/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isElement } from "lodash"; export = isElement; diff --git a/lodash.isempty/index.d.ts b/lodash.isempty/index.d.ts index dc550a45a3..bff4c499aa 100644 --- a/lodash.isempty/index.d.ts +++ b/lodash.isempty/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isEmpty } from "lodash"; export = isEmpty; diff --git a/lodash.isequal/index.d.ts b/lodash.isequal/index.d.ts index b19d0c04d5..d06f5a2a2a 100644 --- a/lodash.isequal/index.d.ts +++ b/lodash.isequal/index.d.ts @@ -1,7 +1,8 @@ -// Type definitions for lodash.isEqual 4.4 +// Type definitions for lodash.isEqual 4.5 // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isEqual } from "lodash"; export = isEqual; diff --git a/lodash.isequalwith/index.d.ts b/lodash.isequalwith/index.d.ts index 1298491bd4..250895312b 100644 --- a/lodash.isequalwith/index.d.ts +++ b/lodash.isequalwith/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isEqualWith } from "lodash"; export = isEqualWith; diff --git a/lodash.iserror/index.d.ts b/lodash.iserror/index.d.ts index d12d1b7cce..42a2bc0923 100644 --- a/lodash.iserror/index.d.ts +++ b/lodash.iserror/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isError } from "lodash"; export = isError; diff --git a/lodash.isfinite/index.d.ts b/lodash.isfinite/index.d.ts index 8cd096692c..02a28fa204 100644 --- a/lodash.isfinite/index.d.ts +++ b/lodash.isfinite/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isFinite } from "lodash"; export = isFinite; diff --git a/lodash.isfunction/index.d.ts b/lodash.isfunction/index.d.ts index a2276e5633..3253939f6b 100644 --- a/lodash.isfunction/index.d.ts +++ b/lodash.isfunction/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isFunction } from "lodash"; export = isFunction; diff --git a/lodash.isinteger/index.d.ts b/lodash.isinteger/index.d.ts index f2d78c2b1f..7d604a19b6 100644 --- a/lodash.isinteger/index.d.ts +++ b/lodash.isinteger/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isInteger } from "lodash"; export = isInteger; diff --git a/lodash.islength/index.d.ts b/lodash.islength/index.d.ts index abcc89acda..6ed54652e5 100644 --- a/lodash.islength/index.d.ts +++ b/lodash.islength/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isLength } from "lodash"; export = isLength; diff --git a/lodash.ismap/index.d.ts b/lodash.ismap/index.d.ts index 62bde83057..1fc93f3462 100644 --- a/lodash.ismap/index.d.ts +++ b/lodash.ismap/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isMap } from "lodash"; export = isMap; diff --git a/lodash.ismatch/index.d.ts b/lodash.ismatch/index.d.ts index 617f6c9bda..3c8de854e8 100644 --- a/lodash.ismatch/index.d.ts +++ b/lodash.ismatch/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isMatch } from "lodash"; export = isMatch; diff --git a/lodash.ismatchwith/index.d.ts b/lodash.ismatchwith/index.d.ts index ed8ff1b11b..c69ae83ea6 100644 --- a/lodash.ismatchwith/index.d.ts +++ b/lodash.ismatchwith/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isMatchWith } from "lodash"; export = isMatchWith; diff --git a/lodash.isnan/index.d.ts b/lodash.isnan/index.d.ts index 029f8c6e9b..1d95ffe160 100644 --- a/lodash.isnan/index.d.ts +++ b/lodash.isnan/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isNaN } from "lodash"; export = isNaN; diff --git a/lodash.isnative/index.d.ts b/lodash.isnative/index.d.ts index 133f9cea47..29050811ef 100644 --- a/lodash.isnative/index.d.ts +++ b/lodash.isnative/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isNative } from "lodash"; export = isNative; diff --git a/lodash.isnil/index.d.ts b/lodash.isnil/index.d.ts index d3aaa388ee..5199f1657a 100644 --- a/lodash.isnil/index.d.ts +++ b/lodash.isnil/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isNil } from "lodash"; export = isNil; diff --git a/lodash.isnull/index.d.ts b/lodash.isnull/index.d.ts index 87a041d532..117b41f2e5 100644 --- a/lodash.isnull/index.d.ts +++ b/lodash.isnull/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isNull } from "lodash"; export = isNull; diff --git a/lodash.isnumber/index.d.ts b/lodash.isnumber/index.d.ts index 1f88c13582..70e51e9842 100644 --- a/lodash.isnumber/index.d.ts +++ b/lodash.isnumber/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isNumber } from "lodash"; export = isNumber; diff --git a/lodash.isobject/index.d.ts b/lodash.isobject/index.d.ts index 229357175a..6f79f888df 100644 --- a/lodash.isobject/index.d.ts +++ b/lodash.isobject/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isObject } from "lodash"; export = isObject; diff --git a/lodash.isobjectlike/index.d.ts b/lodash.isobjectlike/index.d.ts index 5c5c4bcdb3..8423f18a2a 100644 --- a/lodash.isobjectlike/index.d.ts +++ b/lodash.isobjectlike/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isObjectLike } from "lodash"; export = isObjectLike; diff --git a/lodash.isplainobject/index.d.ts b/lodash.isplainobject/index.d.ts index c5e4af82cd..33e85453d2 100644 --- a/lodash.isplainobject/index.d.ts +++ b/lodash.isplainobject/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isPlainObject } from "lodash"; export = isPlainObject; diff --git a/lodash.isregexp/index.d.ts b/lodash.isregexp/index.d.ts index bb6e4c182b..509c93a365 100644 --- a/lodash.isregexp/index.d.ts +++ b/lodash.isregexp/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isRegExp } from "lodash"; export = isRegExp; diff --git a/lodash.issafeinteger/index.d.ts b/lodash.issafeinteger/index.d.ts index 9c86763ba2..28fe1c868c 100644 --- a/lodash.issafeinteger/index.d.ts +++ b/lodash.issafeinteger/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isSafeInteger } from "lodash"; export = isSafeInteger; diff --git a/lodash.isset/index.d.ts b/lodash.isset/index.d.ts index eb77cabac8..67f643bb74 100644 --- a/lodash.isset/index.d.ts +++ b/lodash.isset/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isSet } from "lodash"; export = isSet; diff --git a/lodash.isstring/index.d.ts b/lodash.isstring/index.d.ts index 67ee27673d..42cca91fee 100644 --- a/lodash.isstring/index.d.ts +++ b/lodash.isstring/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isString } from "lodash"; export = isString; diff --git a/lodash.issymbol/index.d.ts b/lodash.issymbol/index.d.ts index d7be47d922..16468073cc 100644 --- a/lodash.issymbol/index.d.ts +++ b/lodash.issymbol/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isSymbol } from "lodash"; export = isSymbol; diff --git a/lodash.istypedarray/index.d.ts b/lodash.istypedarray/index.d.ts index 138f4baa08..e93a364295 100644 --- a/lodash.istypedarray/index.d.ts +++ b/lodash.istypedarray/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isTypedArray } from "lodash"; export = isTypedArray; diff --git a/lodash.isundefined/index.d.ts b/lodash.isundefined/index.d.ts index 2b112959c9..e9a3553600 100644 --- a/lodash.isundefined/index.d.ts +++ b/lodash.isundefined/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isUndefined } from "lodash"; export = isUndefined; diff --git a/lodash.isweakmap/index.d.ts b/lodash.isweakmap/index.d.ts index a6fbc47986..7e2be4cfb2 100644 --- a/lodash.isweakmap/index.d.ts +++ b/lodash.isweakmap/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isWeakMap } from "lodash"; export = isWeakMap; diff --git a/lodash.isweakset/index.d.ts b/lodash.isweakset/index.d.ts index d4b016f106..d7e1a801eb 100644 --- a/lodash.isweakset/index.d.ts +++ b/lodash.isweakset/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { isWeakSet } from "lodash"; export = isWeakSet; diff --git a/lodash.iteratee/index.d.ts b/lodash.iteratee/index.d.ts index 3e494ef2c8..7f6a197f12 100644 --- a/lodash.iteratee/index.d.ts +++ b/lodash.iteratee/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { iteratee } from "lodash"; export = iteratee; diff --git a/lodash.join/index.d.ts b/lodash.join/index.d.ts index 14f26d67ed..a8dd2622a1 100644 --- a/lodash.join/index.d.ts +++ b/lodash.join/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { join } from "lodash"; export = join; diff --git a/lodash.kebabcase/index.d.ts b/lodash.kebabcase/index.d.ts index 0851c7672a..00163a5a33 100644 --- a/lodash.kebabcase/index.d.ts +++ b/lodash.kebabcase/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { kebabCase } from "lodash"; export = kebabCase; diff --git a/lodash.keyby/index.d.ts b/lodash.keyby/index.d.ts index 51aac439ca..8b5700ad76 100644 --- a/lodash.keyby/index.d.ts +++ b/lodash.keyby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { keyBy } from "lodash"; export = keyBy; diff --git a/lodash.keys/index.d.ts b/lodash.keys/index.d.ts index b514c21483..d862fb0541 100644 --- a/lodash.keys/index.d.ts +++ b/lodash.keys/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { keys } from "lodash"; export = keys; diff --git a/lodash.keysin/index.d.ts b/lodash.keysin/index.d.ts index 66a18cdfa7..e15bece518 100644 --- a/lodash.keysin/index.d.ts +++ b/lodash.keysin/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { keysIn } from "lodash"; export = keysIn; diff --git a/lodash.last/index.d.ts b/lodash.last/index.d.ts index a06a998d86..29b4ce9c63 100644 --- a/lodash.last/index.d.ts +++ b/lodash.last/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { last } from "lodash"; export = last; diff --git a/lodash.lastindexof/index.d.ts b/lodash.lastindexof/index.d.ts index 5fccab48d0..a9459ada4d 100644 --- a/lodash.lastindexof/index.d.ts +++ b/lodash.lastindexof/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { lastIndexOf } from "lodash"; export = lastIndexOf; diff --git a/lodash.lowercase/index.d.ts b/lodash.lowercase/index.d.ts index 4232be29ad..b9505737bc 100644 --- a/lodash.lowercase/index.d.ts +++ b/lodash.lowercase/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { lowerCase } from "lodash"; export = lowerCase; diff --git a/lodash.lowerfirst/index.d.ts b/lodash.lowerfirst/index.d.ts index c5d0ea1ca6..424d02631b 100644 --- a/lodash.lowerfirst/index.d.ts +++ b/lodash.lowerfirst/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { lowerFirst } from "lodash"; export = lowerFirst; diff --git a/lodash.lt/index.d.ts b/lodash.lt/index.d.ts index 71cc6c1c00..5bad744986 100644 --- a/lodash.lt/index.d.ts +++ b/lodash.lt/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { lt } from "lodash"; export = lt; diff --git a/lodash.lte/index.d.ts b/lodash.lte/index.d.ts index 61ddce98b1..5299138c0f 100644 --- a/lodash.lte/index.d.ts +++ b/lodash.lte/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { lte } from "lodash"; export = lte; diff --git a/lodash.mapkeys/index.d.ts b/lodash.mapkeys/index.d.ts index c56b7647f5..bb32f2862f 100644 --- a/lodash.mapkeys/index.d.ts +++ b/lodash.mapkeys/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { mapKeys } from "lodash"; export = mapKeys; diff --git a/lodash.mapvalues/index.d.ts b/lodash.mapvalues/index.d.ts index 4507f9234e..db516f2de8 100644 --- a/lodash.mapvalues/index.d.ts +++ b/lodash.mapvalues/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { mapValues } from "lodash"; export = mapValues; diff --git a/lodash.matches/index.d.ts b/lodash.matches/index.d.ts index 9179ed074b..f80ba05944 100644 --- a/lodash.matches/index.d.ts +++ b/lodash.matches/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { matches } from "lodash"; export = matches; diff --git a/lodash.matchesproperty/index.d.ts b/lodash.matchesproperty/index.d.ts index afbb8dbfb3..e240a6ebad 100644 --- a/lodash.matchesproperty/index.d.ts +++ b/lodash.matchesproperty/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { matchesProperty } from "lodash"; export = matchesProperty; diff --git a/lodash.max/index.d.ts b/lodash.max/index.d.ts index 55167fee93..dc8297841f 100644 --- a/lodash.max/index.d.ts +++ b/lodash.max/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { max } from "lodash"; export = max; diff --git a/lodash.maxby/index.d.ts b/lodash.maxby/index.d.ts index 2513ce999f..47210f79a7 100644 --- a/lodash.maxby/index.d.ts +++ b/lodash.maxby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { maxBy } from "lodash"; export = maxBy; diff --git a/lodash.mean/index.d.ts b/lodash.mean/index.d.ts index bbf8183e23..dc839ace51 100644 --- a/lodash.mean/index.d.ts +++ b/lodash.mean/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { mean } from "lodash"; export = mean; diff --git a/lodash.meanby/index.d.ts b/lodash.meanby/index.d.ts new file mode 100644 index 0000000000..8973d40ded --- /dev/null +++ b/lodash.meanby/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for lodash.meanBy 4.10 +// Project: http://lodash.com/ +// Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +import { meanBy } from "lodash"; +export = meanBy; diff --git a/lodash.meanby/tsconfig.json b/lodash.meanby/tsconfig.json new file mode 100644 index 0000000000..5692e5627e --- /dev/null +++ b/lodash.meanby/tsconfig.json @@ -0,0 +1,19 @@ +{ + "files": [ + "index.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} \ No newline at end of file diff --git a/lodash.meanby/tslint.json b/lodash.meanby/tslint.json new file mode 100644 index 0000000000..192203ab54 --- /dev/null +++ b/lodash.meanby/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} \ No newline at end of file diff --git a/lodash.memoize/index.d.ts b/lodash.memoize/index.d.ts index 6a4c57a197..25002a9086 100644 --- a/lodash.memoize/index.d.ts +++ b/lodash.memoize/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { memoize } from "lodash"; export = memoize; diff --git a/lodash.merge/index.d.ts b/lodash.merge/index.d.ts index f4250afe0a..a5352b8cc9 100644 --- a/lodash.merge/index.d.ts +++ b/lodash.merge/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { merge } from "lodash"; export = merge; diff --git a/lodash.mergewith/index.d.ts b/lodash.mergewith/index.d.ts index d22369299e..85cad973d9 100644 --- a/lodash.mergewith/index.d.ts +++ b/lodash.mergewith/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { mergeWith } from "lodash"; export = mergeWith; diff --git a/lodash.method/index.d.ts b/lodash.method/index.d.ts index d890f661e2..cee310ff55 100644 --- a/lodash.method/index.d.ts +++ b/lodash.method/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { method } from "lodash"; export = method; diff --git a/lodash.methodof/index.d.ts b/lodash.methodof/index.d.ts index b464af2fc4..5420de784a 100644 --- a/lodash.methodof/index.d.ts +++ b/lodash.methodof/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { methodOf } from "lodash"; export = methodOf; diff --git a/lodash.min/index.d.ts b/lodash.min/index.d.ts index 5f4dc842dd..87fccd9876 100644 --- a/lodash.min/index.d.ts +++ b/lodash.min/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { min } from "lodash"; export = min; diff --git a/lodash.minby/index.d.ts b/lodash.minby/index.d.ts index 95293a83bf..d46f507c70 100644 --- a/lodash.minby/index.d.ts +++ b/lodash.minby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { minBy } from "lodash"; export = minBy; diff --git a/lodash.mixin/index.d.ts b/lodash.mixin/index.d.ts index 78190227b1..8a4190762b 100644 --- a/lodash.mixin/index.d.ts +++ b/lodash.mixin/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { mixin } from "lodash"; export = mixin; diff --git a/lodash.negate/index.d.ts b/lodash.negate/index.d.ts index 48796a3750..a4c8b4b88e 100644 --- a/lodash.negate/index.d.ts +++ b/lodash.negate/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { negate } from "lodash"; export = negate; diff --git a/lodash.noop/index.d.ts b/lodash.noop/index.d.ts index 632d3d1292..04e6cacbb3 100644 --- a/lodash.noop/index.d.ts +++ b/lodash.noop/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { noop } from "lodash"; export = noop; diff --git a/lodash.now/index.d.ts b/lodash.now/index.d.ts index 80e893d018..ecda7f778d 100644 --- a/lodash.now/index.d.ts +++ b/lodash.now/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { now } from "lodash"; export = now; diff --git a/lodash.ntharg/index.d.ts b/lodash.ntharg/index.d.ts index 51eb387c96..0d35cb5772 100644 --- a/lodash.ntharg/index.d.ts +++ b/lodash.ntharg/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { nthArg } from "lodash"; export = nthArg; diff --git a/lodash.omit/index.d.ts b/lodash.omit/index.d.ts index b60f1d503b..491b505016 100644 --- a/lodash.omit/index.d.ts +++ b/lodash.omit/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { omit } from "lodash"; export = omit; diff --git a/lodash.omitby/index.d.ts b/lodash.omitby/index.d.ts index 82c8b6d063..fee479036b 100644 --- a/lodash.omitby/index.d.ts +++ b/lodash.omitby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { omitBy } from "lodash"; export = omitBy; diff --git a/lodash.once/index.d.ts b/lodash.once/index.d.ts index 3089544fe9..3f8622e6a0 100644 --- a/lodash.once/index.d.ts +++ b/lodash.once/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { once } from "lodash"; export = once; diff --git a/lodash.orderby/index.d.ts b/lodash.orderby/index.d.ts index e862a62e96..b348cefebc 100644 --- a/lodash.orderby/index.d.ts +++ b/lodash.orderby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { orderBy } from "lodash"; export = orderBy; diff --git a/lodash.over/index.d.ts b/lodash.over/index.d.ts index 1df6138a41..5715f0a46e 100644 --- a/lodash.over/index.d.ts +++ b/lodash.over/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { over } from "lodash"; export = over; diff --git a/lodash.overargs/index.d.ts b/lodash.overargs/index.d.ts index 1cd9c19126..576ab8588a 100644 --- a/lodash.overargs/index.d.ts +++ b/lodash.overargs/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { overArgs } from "lodash"; export = overArgs; diff --git a/lodash.overevery/index.d.ts b/lodash.overevery/index.d.ts index 2211dc569b..68d6cd3639 100644 --- a/lodash.overevery/index.d.ts +++ b/lodash.overevery/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { overEvery } from "lodash"; export = overEvery; diff --git a/lodash.oversome/index.d.ts b/lodash.oversome/index.d.ts index f8ec5329f6..4e4fe4eb5c 100644 --- a/lodash.oversome/index.d.ts +++ b/lodash.oversome/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { overSome } from "lodash"; export = overSome; diff --git a/lodash.pad/index.d.ts b/lodash.pad/index.d.ts index 06a7c7f5ac..259c312381 100644 --- a/lodash.pad/index.d.ts +++ b/lodash.pad/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { pad } from "lodash"; export = pad; diff --git a/lodash.padend/index.d.ts b/lodash.padend/index.d.ts index b42ad0ab11..825479dae8 100644 --- a/lodash.padend/index.d.ts +++ b/lodash.padend/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { padEnd } from "lodash"; export = padEnd; diff --git a/lodash.padstart/index.d.ts b/lodash.padstart/index.d.ts index b020c51ee5..b3607d61cc 100644 --- a/lodash.padstart/index.d.ts +++ b/lodash.padstart/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { padStart } from "lodash"; export = padStart; diff --git a/lodash.parseint/index.d.ts b/lodash.parseint/index.d.ts index cafd05c882..4724867112 100644 --- a/lodash.parseint/index.d.ts +++ b/lodash.parseint/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { parseInt } from "lodash"; export = parseInt; diff --git a/lodash.partial/index.d.ts b/lodash.partial/index.d.ts index 4d6dc3c303..8466a32963 100644 --- a/lodash.partial/index.d.ts +++ b/lodash.partial/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { partial } from "lodash"; export = partial; diff --git a/lodash.partialright/index.d.ts b/lodash.partialright/index.d.ts index d24675203d..5f9f7bef4d 100644 --- a/lodash.partialright/index.d.ts +++ b/lodash.partialright/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { partialRight } from "lodash"; export = partialRight; diff --git a/lodash.partition/index.d.ts b/lodash.partition/index.d.ts index c79c676a46..d481bae93b 100644 --- a/lodash.partition/index.d.ts +++ b/lodash.partition/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { partition } from "lodash"; export = partition; diff --git a/lodash.pick/index.d.ts b/lodash.pick/index.d.ts index 7fa2ef6e84..f27646190a 100644 --- a/lodash.pick/index.d.ts +++ b/lodash.pick/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { pick } from "lodash"; export = pick; diff --git a/lodash.pickby/index.d.ts b/lodash.pickby/index.d.ts index 2c72e96edd..0a77aaedc8 100644 --- a/lodash.pickby/index.d.ts +++ b/lodash.pickby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { pickBy } from "lodash"; export = pickBy; diff --git a/lodash.property/index.d.ts b/lodash.property/index.d.ts index e9ea2b894e..90e3eb20b3 100644 --- a/lodash.property/index.d.ts +++ b/lodash.property/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { property } from "lodash"; export = property; diff --git a/lodash.propertyof/index.d.ts b/lodash.propertyof/index.d.ts index d52d898afa..2db1d2461f 100644 --- a/lodash.propertyof/index.d.ts +++ b/lodash.propertyof/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { propertyOf } from "lodash"; export = propertyOf; diff --git a/lodash.pull/index.d.ts b/lodash.pull/index.d.ts index b60aec6f73..7232218789 100644 --- a/lodash.pull/index.d.ts +++ b/lodash.pull/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { pull } from "lodash"; export = pull; diff --git a/lodash.pullall/index.d.ts b/lodash.pullall/index.d.ts index 4c55d19fc0..9503a4c6e5 100644 --- a/lodash.pullall/index.d.ts +++ b/lodash.pullall/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { pullAll } from "lodash"; export = pullAll; diff --git a/lodash.pullallby/index.d.ts b/lodash.pullallby/index.d.ts index 18bc32f579..4f5c91696f 100644 --- a/lodash.pullallby/index.d.ts +++ b/lodash.pullallby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { pullAllBy } from "lodash"; export = pullAllBy; diff --git a/lodash.pullat/index.d.ts b/lodash.pullat/index.d.ts index 4a7c29cb90..2330713675 100644 --- a/lodash.pullat/index.d.ts +++ b/lodash.pullat/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { pullAt } from "lodash"; export = pullAt; diff --git a/lodash.random/index.d.ts b/lodash.random/index.d.ts index 018f4e1c99..87ba37f817 100644 --- a/lodash.random/index.d.ts +++ b/lodash.random/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { random } from "lodash"; export = random; diff --git a/lodash.range/index.d.ts b/lodash.range/index.d.ts index 289101b98a..6e9871a10a 100644 --- a/lodash.range/index.d.ts +++ b/lodash.range/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { range } from "lodash"; export = range; diff --git a/lodash.rangeright/index.d.ts b/lodash.rangeright/index.d.ts index 15d7f8be2b..b7fcfd8b34 100644 --- a/lodash.rangeright/index.d.ts +++ b/lodash.rangeright/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { rangeRight } from "lodash"; export = rangeRight; diff --git a/lodash.rearg/index.d.ts b/lodash.rearg/index.d.ts index 987565e162..8c6f912bcd 100644 --- a/lodash.rearg/index.d.ts +++ b/lodash.rearg/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { rearg } from "lodash"; export = rearg; diff --git a/lodash.reduce/index.d.ts b/lodash.reduce/index.d.ts index 44f4007e94..5ef634a93d 100644 --- a/lodash.reduce/index.d.ts +++ b/lodash.reduce/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { reduce } from "lodash"; export = reduce; diff --git a/lodash.reduceright/index.d.ts b/lodash.reduceright/index.d.ts index 3377523e1a..ee3e05ea62 100644 --- a/lodash.reduceright/index.d.ts +++ b/lodash.reduceright/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { reduceRight } from "lodash"; export = reduceRight; diff --git a/lodash.reject/index.d.ts b/lodash.reject/index.d.ts index f7e56a60bc..2a7a953403 100644 --- a/lodash.reject/index.d.ts +++ b/lodash.reject/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { reject } from "lodash"; export = reject; diff --git a/lodash.remove/index.d.ts b/lodash.remove/index.d.ts index b6b2871f51..cf3ecdb008 100644 --- a/lodash.remove/index.d.ts +++ b/lodash.remove/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { remove } from "lodash"; export = remove; diff --git a/lodash.repeat/index.d.ts b/lodash.repeat/index.d.ts index a0ab5e77f2..066a9f7741 100644 --- a/lodash.repeat/index.d.ts +++ b/lodash.repeat/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { repeat } from "lodash"; export = repeat; diff --git a/lodash.replace/index.d.ts b/lodash.replace/index.d.ts index d1dc58bad0..deaf6f5925 100644 --- a/lodash.replace/index.d.ts +++ b/lodash.replace/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { replace } from "lodash"; export = replace; diff --git a/lodash.rest/index.d.ts b/lodash.rest/index.d.ts index c8b2728ec5..12d89f07a4 100644 --- a/lodash.rest/index.d.ts +++ b/lodash.rest/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { rest } from "lodash"; export = rest; diff --git a/lodash.result/index.d.ts b/lodash.result/index.d.ts index 344d75766a..ca67b40446 100644 --- a/lodash.result/index.d.ts +++ b/lodash.result/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { result } from "lodash"; export = result; diff --git a/lodash.reverse/index.d.ts b/lodash.reverse/index.d.ts index 8da6b703f7..0486ee3715 100644 --- a/lodash.reverse/index.d.ts +++ b/lodash.reverse/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { reverse } from "lodash"; export = reverse; diff --git a/lodash.round/index.d.ts b/lodash.round/index.d.ts index 828aee5487..5eb7dddb09 100644 --- a/lodash.round/index.d.ts +++ b/lodash.round/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { round } from "lodash"; export = round; diff --git a/lodash.sample/index.d.ts b/lodash.sample/index.d.ts index 2fa651cce8..b5873086e2 100644 --- a/lodash.sample/index.d.ts +++ b/lodash.sample/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { sample } from "lodash"; export = sample; diff --git a/lodash.samplesize/index.d.ts b/lodash.samplesize/index.d.ts index 5be09b8960..01a187726b 100644 --- a/lodash.samplesize/index.d.ts +++ b/lodash.samplesize/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { sampleSize } from "lodash"; export = sampleSize; diff --git a/lodash.set/index.d.ts b/lodash.set/index.d.ts index 45c51f879a..f76b88790e 100644 --- a/lodash.set/index.d.ts +++ b/lodash.set/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { set } from "lodash"; export = set; diff --git a/lodash.setwith/index.d.ts b/lodash.setwith/index.d.ts index 8c41eb3be6..43502688be 100644 --- a/lodash.setwith/index.d.ts +++ b/lodash.setwith/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { setWith } from "lodash"; export = setWith; diff --git a/lodash.shuffle/index.d.ts b/lodash.shuffle/index.d.ts index 7b8e65fde0..1283f11844 100644 --- a/lodash.shuffle/index.d.ts +++ b/lodash.shuffle/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { shuffle } from "lodash"; export = shuffle; diff --git a/lodash.size/index.d.ts b/lodash.size/index.d.ts index 6e7201c394..e0aa69d12f 100644 --- a/lodash.size/index.d.ts +++ b/lodash.size/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { size } from "lodash"; export = size; diff --git a/lodash.slice/index.d.ts b/lodash.slice/index.d.ts index b9206644eb..2b53bb2386 100644 --- a/lodash.slice/index.d.ts +++ b/lodash.slice/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { slice } from "lodash"; export = slice; diff --git a/lodash.snakecase/index.d.ts b/lodash.snakecase/index.d.ts index 36fbaec580..db2758999b 100644 --- a/lodash.snakecase/index.d.ts +++ b/lodash.snakecase/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { snakeCase } from "lodash"; export = snakeCase; diff --git a/lodash.some/index.d.ts b/lodash.some/index.d.ts index e722a5ccae..3de45fa161 100644 --- a/lodash.some/index.d.ts +++ b/lodash.some/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { some } from "lodash"; export = some; diff --git a/lodash.sortby/index.d.ts b/lodash.sortby/index.d.ts index 028b50fa20..cc75aa6dca 100644 --- a/lodash.sortby/index.d.ts +++ b/lodash.sortby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { sortBy } from "lodash"; export = sortBy; diff --git a/lodash.sortedindex/index.d.ts b/lodash.sortedindex/index.d.ts index 9c799fec11..ab6e8eca1f 100644 --- a/lodash.sortedindex/index.d.ts +++ b/lodash.sortedindex/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { sortedIndex } from "lodash"; export = sortedIndex; diff --git a/lodash.sortedindexby/index.d.ts b/lodash.sortedindexby/index.d.ts index 73601c7b4d..1f5d0c15ac 100644 --- a/lodash.sortedindexby/index.d.ts +++ b/lodash.sortedindexby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { sortedIndexBy } from "lodash"; export = sortedIndexBy; diff --git a/lodash.sortedindexof/index.d.ts b/lodash.sortedindexof/index.d.ts index 471e408bb9..814afd3e3c 100644 --- a/lodash.sortedindexof/index.d.ts +++ b/lodash.sortedindexof/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { sortedIndexOf } from "lodash"; export = sortedIndexOf; diff --git a/lodash.sortedlastindex/index.d.ts b/lodash.sortedlastindex/index.d.ts index 95825a983a..5a1c0faa7d 100644 --- a/lodash.sortedlastindex/index.d.ts +++ b/lodash.sortedlastindex/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { sortedLastIndex } from "lodash"; export = sortedLastIndex; diff --git a/lodash.sortedlastindexby/index.d.ts b/lodash.sortedlastindexby/index.d.ts index e5a167a17b..5b939599b2 100644 --- a/lodash.sortedlastindexby/index.d.ts +++ b/lodash.sortedlastindexby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { sortedLastIndexBy } from "lodash"; export = sortedLastIndexBy; diff --git a/lodash.sortedlastindexof/index.d.ts b/lodash.sortedlastindexof/index.d.ts index c908ede67a..9817ef54f5 100644 --- a/lodash.sortedlastindexof/index.d.ts +++ b/lodash.sortedlastindexof/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { sortedLastIndexOf } from "lodash"; export = sortedLastIndexOf; diff --git a/lodash.sorteduniq/index.d.ts b/lodash.sorteduniq/index.d.ts index c9ff4eb4e7..c8b8feea6f 100644 --- a/lodash.sorteduniq/index.d.ts +++ b/lodash.sorteduniq/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { sortedUniq } from "lodash"; export = sortedUniq; diff --git a/lodash.sorteduniqby/index.d.ts b/lodash.sorteduniqby/index.d.ts index 295d3bcaf3..637895af43 100644 --- a/lodash.sorteduniqby/index.d.ts +++ b/lodash.sorteduniqby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { sortedUniqBy } from "lodash"; export = sortedUniqBy; diff --git a/lodash.split/index.d.ts b/lodash.split/index.d.ts index 43c187c455..fd5a261917 100644 --- a/lodash.split/index.d.ts +++ b/lodash.split/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { split } from "lodash"; export = split; diff --git a/lodash.spread/index.d.ts b/lodash.spread/index.d.ts index adaec68385..7bbc4e9245 100644 --- a/lodash.spread/index.d.ts +++ b/lodash.spread/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { spread } from "lodash"; export = spread; diff --git a/lodash.startcase/index.d.ts b/lodash.startcase/index.d.ts index 9c550e4a0c..53798256bc 100644 --- a/lodash.startcase/index.d.ts +++ b/lodash.startcase/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { startCase } from "lodash"; export = startCase; diff --git a/lodash.startswith/index.d.ts b/lodash.startswith/index.d.ts index ebb4178ac5..84071e3d10 100644 --- a/lodash.startswith/index.d.ts +++ b/lodash.startswith/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { startsWith } from "lodash"; export = startsWith; diff --git a/lodash.subtract/index.d.ts b/lodash.subtract/index.d.ts index 6d148eb796..0b57101cee 100644 --- a/lodash.subtract/index.d.ts +++ b/lodash.subtract/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { subtract } from "lodash"; export = subtract; diff --git a/lodash.sum/index.d.ts b/lodash.sum/index.d.ts index df4194246e..e6aaf24aee 100644 --- a/lodash.sum/index.d.ts +++ b/lodash.sum/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { sum } from "lodash"; export = sum; diff --git a/lodash.sumby/index.d.ts b/lodash.sumby/index.d.ts index dad7e3dfa7..e1f21e1454 100644 --- a/lodash.sumby/index.d.ts +++ b/lodash.sumby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { sumBy } from "lodash"; export = sumBy; diff --git a/lodash.tail/index.d.ts b/lodash.tail/index.d.ts index 1edf5423c0..7543f1ae31 100644 --- a/lodash.tail/index.d.ts +++ b/lodash.tail/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { tail } from "lodash"; export = tail; diff --git a/lodash.take/index.d.ts b/lodash.take/index.d.ts index f477178ee3..688eaf7b8d 100644 --- a/lodash.take/index.d.ts +++ b/lodash.take/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { take } from "lodash"; export = take; diff --git a/lodash.takeright/index.d.ts b/lodash.takeright/index.d.ts index f44b5b7a99..9599696c72 100644 --- a/lodash.takeright/index.d.ts +++ b/lodash.takeright/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { takeRight } from "lodash"; export = takeRight; diff --git a/lodash.takerightwhile/index.d.ts b/lodash.takerightwhile/index.d.ts index 1940bdab6a..b0ccc8647f 100644 --- a/lodash.takerightwhile/index.d.ts +++ b/lodash.takerightwhile/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { takeRightWhile } from "lodash"; export = takeRightWhile; diff --git a/lodash.takewhile/index.d.ts b/lodash.takewhile/index.d.ts index b1c7464e21..8e557afdd4 100644 --- a/lodash.takewhile/index.d.ts +++ b/lodash.takewhile/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { takeWhile } from "lodash"; export = takeWhile; diff --git a/lodash.template/index.d.ts b/lodash.template/index.d.ts index af31692e84..a81b832990 100644 --- a/lodash.template/index.d.ts +++ b/lodash.template/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { template } from "lodash"; export = template; diff --git a/lodash.throttle/index.d.ts b/lodash.throttle/index.d.ts index ed74ec008b..0a2903b317 100644 --- a/lodash.throttle/index.d.ts +++ b/lodash.throttle/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { throttle } from "lodash"; export = throttle; diff --git a/lodash.times/index.d.ts b/lodash.times/index.d.ts index adabd498e2..f899aac24e 100644 --- a/lodash.times/index.d.ts +++ b/lodash.times/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { times } from "lodash"; export = times; diff --git a/lodash.toarray/index.d.ts b/lodash.toarray/index.d.ts index 42e878de35..f1cb6ecdea 100644 --- a/lodash.toarray/index.d.ts +++ b/lodash.toarray/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { toArray } from "lodash"; export = toArray; diff --git a/lodash.tointeger/index.d.ts b/lodash.tointeger/index.d.ts index 19a97ef2fd..32f5bafbb7 100644 --- a/lodash.tointeger/index.d.ts +++ b/lodash.tointeger/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { toInteger } from "lodash"; export = toInteger; diff --git a/lodash.tolength/index.d.ts b/lodash.tolength/index.d.ts index 1170461e93..0af29d75fd 100644 --- a/lodash.tolength/index.d.ts +++ b/lodash.tolength/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { toLength } from "lodash"; export = toLength; diff --git a/lodash.tolower/index.d.ts b/lodash.tolower/index.d.ts index 1f350ff005..1403cc4cee 100644 --- a/lodash.tolower/index.d.ts +++ b/lodash.tolower/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { toLower } from "lodash"; export = toLower; diff --git a/lodash.tonumber/index.d.ts b/lodash.tonumber/index.d.ts index fd6fe57a0b..aeacc96956 100644 --- a/lodash.tonumber/index.d.ts +++ b/lodash.tonumber/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { toNumber } from "lodash"; export = toNumber; diff --git a/lodash.topairs/index.d.ts b/lodash.topairs/index.d.ts index 0623631aac..e5c92897ba 100644 --- a/lodash.topairs/index.d.ts +++ b/lodash.topairs/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { toPairs } from "lodash"; export = toPairs; diff --git a/lodash.topairsin/index.d.ts b/lodash.topairsin/index.d.ts index 6da8aac997..c4980bf227 100644 --- a/lodash.topairsin/index.d.ts +++ b/lodash.topairsin/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { toPairsIn } from "lodash"; export = toPairsIn; diff --git a/lodash.topath/index.d.ts b/lodash.topath/index.d.ts index ed9ce7c5a9..5647cbca88 100644 --- a/lodash.topath/index.d.ts +++ b/lodash.topath/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { toPath } from "lodash"; export = toPath; diff --git a/lodash.toplainobject/index.d.ts b/lodash.toplainobject/index.d.ts index c1b5793d7d..27de1990bd 100644 --- a/lodash.toplainobject/index.d.ts +++ b/lodash.toplainobject/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { toPlainObject } from "lodash"; export = toPlainObject; diff --git a/lodash.tosafeinteger/index.d.ts b/lodash.tosafeinteger/index.d.ts index b126b0188a..c8d7567a70 100644 --- a/lodash.tosafeinteger/index.d.ts +++ b/lodash.tosafeinteger/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { toSafeInteger } from "lodash"; export = toSafeInteger; diff --git a/lodash.tostring/index.d.ts b/lodash.tostring/index.d.ts index bf9ed55be9..42f59393f1 100644 --- a/lodash.tostring/index.d.ts +++ b/lodash.tostring/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { toString } from "lodash"; export = toString; diff --git a/lodash.toupper/index.d.ts b/lodash.toupper/index.d.ts index 9e26f50c2b..02bef92ae3 100644 --- a/lodash.toupper/index.d.ts +++ b/lodash.toupper/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { toUpper } from "lodash"; export = toUpper; diff --git a/lodash.transform/index.d.ts b/lodash.transform/index.d.ts index 78c4bfdb7c..ac5ee501cf 100644 --- a/lodash.transform/index.d.ts +++ b/lodash.transform/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { transform } from "lodash"; export = transform; diff --git a/lodash.trim/index.d.ts b/lodash.trim/index.d.ts index 4848a6ddbd..7aa6fcc4e6 100644 --- a/lodash.trim/index.d.ts +++ b/lodash.trim/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { trim } from "lodash"; export = trim; diff --git a/lodash.trimend/index.d.ts b/lodash.trimend/index.d.ts index 116f295b06..1e871b2126 100644 --- a/lodash.trimend/index.d.ts +++ b/lodash.trimend/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { trimEnd } from "lodash"; export = trimEnd; diff --git a/lodash.trimstart/index.d.ts b/lodash.trimstart/index.d.ts index 93df2c2483..c525bf5c8e 100644 --- a/lodash.trimstart/index.d.ts +++ b/lodash.trimstart/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { trimStart } from "lodash"; export = trimStart; diff --git a/lodash.truncate/index.d.ts b/lodash.truncate/index.d.ts index b658478894..cb421e8a26 100644 --- a/lodash.truncate/index.d.ts +++ b/lodash.truncate/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { truncate } from "lodash"; export = truncate; diff --git a/lodash.unary/index.d.ts b/lodash.unary/index.d.ts index 55c5e46f1d..12a281f507 100644 --- a/lodash.unary/index.d.ts +++ b/lodash.unary/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { unary } from "lodash"; export = unary; diff --git a/lodash.unescape/index.d.ts b/lodash.unescape/index.d.ts index c78fecec34..8340900768 100644 --- a/lodash.unescape/index.d.ts +++ b/lodash.unescape/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { unescape } from "lodash"; export = unescape; diff --git a/lodash.union/index.d.ts b/lodash.union/index.d.ts index 386967dec1..cddbaf12aa 100644 --- a/lodash.union/index.d.ts +++ b/lodash.union/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { union } from "lodash"; export = union; diff --git a/lodash.unionby/index.d.ts b/lodash.unionby/index.d.ts index dc0c0f1245..9c64ce9ed8 100644 --- a/lodash.unionby/index.d.ts +++ b/lodash.unionby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { unionBy } from "lodash"; export = unionBy; diff --git a/lodash.unionwith/index.d.ts b/lodash.unionwith/index.d.ts index da2cae278a..a3757085ba 100644 --- a/lodash.unionwith/index.d.ts +++ b/lodash.unionwith/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { unionWith } from "lodash"; export = unionWith; diff --git a/lodash.uniq/index.d.ts b/lodash.uniq/index.d.ts index 675b710028..a274db1b67 100644 --- a/lodash.uniq/index.d.ts +++ b/lodash.uniq/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { uniq } from "lodash"; export = uniq; diff --git a/lodash.uniqby/index.d.ts b/lodash.uniqby/index.d.ts index 0eedfb6d3f..c6dcd7c0c1 100644 --- a/lodash.uniqby/index.d.ts +++ b/lodash.uniqby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { uniqBy } from "lodash"; export = uniqBy; diff --git a/lodash.uniqueid/index.d.ts b/lodash.uniqueid/index.d.ts index abd2ebf55c..046d62d775 100644 --- a/lodash.uniqueid/index.d.ts +++ b/lodash.uniqueid/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { uniqueId } from "lodash"; export = uniqueId; diff --git a/lodash.uniqwith/index.d.ts b/lodash.uniqwith/index.d.ts index 6541b4ef03..515bcc2cba 100644 --- a/lodash.uniqwith/index.d.ts +++ b/lodash.uniqwith/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { uniqWith } from "lodash"; export = uniqWith; diff --git a/lodash.unset/index.d.ts b/lodash.unset/index.d.ts index dcf8e6881a..7662c3fd56 100644 --- a/lodash.unset/index.d.ts +++ b/lodash.unset/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { unset } from "lodash"; export = unset; diff --git a/lodash.unzip/index.d.ts b/lodash.unzip/index.d.ts index 6fe3ebc759..60adfd32e9 100644 --- a/lodash.unzip/index.d.ts +++ b/lodash.unzip/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { unzip } from "lodash"; export = unzip; diff --git a/lodash.unzipwith/index.d.ts b/lodash.unzipwith/index.d.ts index 64f86e45e7..641d1c1468 100644 --- a/lodash.unzipwith/index.d.ts +++ b/lodash.unzipwith/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { unzipWith } from "lodash"; export = unzipWith; diff --git a/lodash.update/index.d.ts b/lodash.update/index.d.ts index 27c5499aeb..f861786fd0 100644 --- a/lodash.update/index.d.ts +++ b/lodash.update/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { update } from "lodash"; export = update; diff --git a/lodash.uppercase/index.d.ts b/lodash.uppercase/index.d.ts index 82e3f7af39..152bf80399 100644 --- a/lodash.uppercase/index.d.ts +++ b/lodash.uppercase/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { upperCase } from "lodash"; export = upperCase; diff --git a/lodash.upperfirst/index.d.ts b/lodash.upperfirst/index.d.ts index 27cfc0bdc2..b76d75f8b6 100644 --- a/lodash.upperfirst/index.d.ts +++ b/lodash.upperfirst/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { upperFirst } from "lodash"; export = upperFirst; diff --git a/lodash.values/index.d.ts b/lodash.values/index.d.ts index 633dbed76d..ff22e7ef36 100644 --- a/lodash.values/index.d.ts +++ b/lodash.values/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { values } from "lodash"; export = values; diff --git a/lodash.valuesin/index.d.ts b/lodash.valuesin/index.d.ts index 1cca8a411d..9137156620 100644 --- a/lodash.valuesin/index.d.ts +++ b/lodash.valuesin/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { valuesIn } from "lodash"; export = valuesIn; diff --git a/lodash.without/index.d.ts b/lodash.without/index.d.ts index 41a55ad642..88cea94b79 100644 --- a/lodash.without/index.d.ts +++ b/lodash.without/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { without } from "lodash"; export = without; diff --git a/lodash.words/index.d.ts b/lodash.words/index.d.ts index 6b886a190f..8076cee94f 100644 --- a/lodash.words/index.d.ts +++ b/lodash.words/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { words } from "lodash"; export = words; diff --git a/lodash.wrap/index.d.ts b/lodash.wrap/index.d.ts index 18ee43f769..ef1e41cb4c 100644 --- a/lodash.wrap/index.d.ts +++ b/lodash.wrap/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { wrap } from "lodash"; export = wrap; diff --git a/lodash.xor/index.d.ts b/lodash.xor/index.d.ts index 6a641cd153..819ad96d72 100644 --- a/lodash.xor/index.d.ts +++ b/lodash.xor/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { xor } from "lodash"; export = xor; diff --git a/lodash.xorby/index.d.ts b/lodash.xorby/index.d.ts index 49ef941467..a60b78d049 100644 --- a/lodash.xorby/index.d.ts +++ b/lodash.xorby/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { xorBy } from "lodash"; export = xorBy; diff --git a/lodash.xorwith/index.d.ts b/lodash.xorwith/index.d.ts index 30b53691f9..ccf6499b89 100644 --- a/lodash.xorwith/index.d.ts +++ b/lodash.xorwith/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { xorWith } from "lodash"; export = xorWith; diff --git a/lodash.zip/index.d.ts b/lodash.zip/index.d.ts index f4793f82ae..278d7a7cff 100644 --- a/lodash.zip/index.d.ts +++ b/lodash.zip/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { zip } from "lodash"; export = zip; diff --git a/lodash.zipobject/index.d.ts b/lodash.zipobject/index.d.ts index df8d4929f9..63e4661ff6 100644 --- a/lodash.zipobject/index.d.ts +++ b/lodash.zipobject/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { zipObject } from "lodash"; export = zipObject; diff --git a/lodash.zipwith/index.d.ts b/lodash.zipwith/index.d.ts index e5b4a6714a..93c417ca57 100644 --- a/lodash.zipwith/index.d.ts +++ b/lodash.zipwith/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import { zipWith } from "lodash"; export = zipWith; diff --git a/lodash/index.d.ts b/lodash/index.d.ts index 678e0c58b9..0cda5ae3d5 100644 --- a/lodash/index.d.ts +++ b/lodash/index.d.ts @@ -2,6 +2,7 @@ // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 /** ### 4.0.0 Changelog (https://github.com/lodash/lodash/wiki/Changelog) @@ -241,7 +242,10 @@ export as namespace _; declare var _: _.LoDashStatic; +type PartialObject = Partial; + declare namespace _ { + type Many = T | T[]; interface LoDashStatic { @@ -6558,9 +6562,9 @@ declare namespace _ { /** * @see _.every */ - every( + every( collection: List|Dictionary|NumericDictionary, - predicate?: TObject + predicate?: PartialObject ): boolean; } @@ -6582,8 +6586,8 @@ declare namespace _ { /** * @see _.every */ - every( - predicate?: TObject + every( + predicate?: PartialObject ): boolean; } @@ -6605,8 +6609,8 @@ declare namespace _ { /** * @see _.every */ - every( - predicate?: TObject + every( + predicate?: PartialObject ): boolean; } @@ -6628,8 +6632,8 @@ declare namespace _ { /** * @see _.every */ - every( - predicate?: TObject + every( + predicate?: PartialObject ): LoDashExplicitWrapper; } @@ -6651,8 +6655,8 @@ declare namespace _ { /** * @see _.every */ - every( - predicate?: TObject + every( + predicate?: PartialObject ): LoDashExplicitWrapper; } @@ -6708,9 +6712,9 @@ declare namespace _ { /** * @see _.filter */ - filter( + filter( collection: List|Dictionary, - predicate: W + predicate: PartialObject ): T[]; } @@ -6741,7 +6745,7 @@ declare namespace _ { /** * @see _.filter */ - filter(predicate: W): LoDashImplicitArrayWrapper; + filter(predicate: PartialObject): LoDashImplicitArrayWrapper; } interface LoDashImplicitObjectWrapper { @@ -6762,7 +6766,7 @@ declare namespace _ { /** * @see _.filter */ - filter(predicate: W): LoDashImplicitArrayWrapper; + filter(predicate: PartialObject): LoDashImplicitArrayWrapper; } interface LoDashExplicitWrapper { @@ -6792,7 +6796,7 @@ declare namespace _ { /** * @see _.filter */ - filter(predicate: W): LoDashExplicitArrayWrapper; + filter(predicate: PartialObject): LoDashExplicitArrayWrapper; } interface LoDashExplicitObjectWrapper { @@ -6813,7 +6817,7 @@ declare namespace _ { /** * @see _.filter */ - filter(predicate: W): LoDashExplicitArrayWrapper; + filter(predicate: PartialObject): LoDashExplicitArrayWrapper; } //_.find @@ -6863,9 +6867,9 @@ declare namespace _ { /** * @see _.find */ - find( + find( collection: List|Dictionary, - predicate?: TObject, + predicate?: PartialObject, fromIndex?: number ): T|undefined; } @@ -6890,8 +6894,8 @@ declare namespace _ { /** * @see _.find */ - find( - predicate?: TObject, + find( + predicate?: PartialObject, fromIndex?: number ): T|undefined; } @@ -6916,8 +6920,8 @@ declare namespace _ { /** * @see _.find */ - find( - predicate?: TObject, + find( + predicate?: PartialObject, fromIndex?: number ): TResult|undefined; } @@ -9204,9 +9208,9 @@ declare namespace _ { /** * @see _.some */ - some( + some( collection: List|Dictionary|NumericDictionary, - predicate?: TObject + predicate?: PartialObject ): boolean; /** @@ -9214,15 +9218,15 @@ declare namespace _ { */ some( collection: List|Dictionary|NumericDictionary, - predicate?: Object + predicate?: PartialObject ): boolean; /** * @see _.some */ - some( + some( collection: Object, - predicate?: TObject + predicate?: PartialObject ): boolean; } @@ -9244,8 +9248,8 @@ declare namespace _ { /** * @see _.some */ - some( - predicate?: TObject + some( + predicate?: PartialObject ): boolean; } @@ -9267,8 +9271,8 @@ declare namespace _ { /** * @see _.some */ - some( - predicate?: TObject + some( + predicate?: PartialObject ): boolean; } @@ -9290,8 +9294,8 @@ declare namespace _ { /** * @see _.some */ - some( - predicate?: TObject + some( + predicate?: PartialObject ): LoDashExplicitWrapper; } @@ -9313,8 +9317,8 @@ declare namespace _ { /** * @see _.some */ - some( - predicate?: TObject + some( + predicate?: PartialObject ): LoDashExplicitWrapper; } diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index c1a5ca3e64..7268f1a8c2 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -3530,49 +3530,49 @@ namespace TestEvery { result = _.every(array, listIterator); result = _.every(array, 'a'); result = _.every(array, ['a', 42]); - result = _.every<{a: number}, SampleObject>(array, {a: 42}); + result = _.every(array, {a: 42}); result = _.every(list); result = _.every(list, listIterator); result = _.every(list, 'a'); result = _.every(list, ['a', 42]); - result = _.every<{a: number}, SampleObject>(list, {a: 42}); + result = _.every(list, {a: 42}); result = _.every(dictionary); result = _.every(dictionary, dictionaryIterator); result = _.every(dictionary, 'a'); result = _.every(dictionary, ['a', 42]); - result = _.every<{a: number}, SampleObject>(dictionary, {a: 42}); + result = _.every(dictionary, {a: 42}); result = _.every(numericDictionary); result = _.every(numericDictionary, numericDictionaryIterator); result = _.every(numericDictionary, 'a'); result = _.every(numericDictionary, ['a', 42]); - result = _.every<{a: number}, SampleObject>(numericDictionary, {a: 42}); + result = _.every(numericDictionary, {a: 42}); result = _(array).every(); result = _(array).every(listIterator); result = _(array).every('a'); result = _(array).every(['a', 42]); - result = _(array).every<{a: number}>({a: 42}); + result = _(array).every({a: 42}); result = _(list).every(); result = _(list).every(listIterator); result = _(list).every('a'); result = _(list).every(['a', 42]); - result = _(list).every<{a: number}>({a: 42}); + result = _(list).every({a: 42}); result = _(dictionary).every(); result = _(dictionary).every(dictionaryIterator); result = _(dictionary).every('a'); result = _(dictionary).every(['a', 42]); - result = _(dictionary).every<{a: number}>({a: 42}); + result = _(dictionary).every({a: 42}); result = _(numericDictionary).every(); result = _(numericDictionary).every(numericDictionaryIterator); result = _(numericDictionary).every('a'); result = _(numericDictionary).every(['a', 42]); - result = _(numericDictionary).every<{a: number}>({a: 42}); + result = _(numericDictionary).every({a: 42}); } { @@ -3582,19 +3582,19 @@ namespace TestEvery { result = _(array).chain().every(listIterator); result = _(array).chain().every('a'); result = _(array).chain().every(['a', 42]); - result = _(array).chain().every<{a: number}>({a: 42}); + result = _(array).chain().every({a: 42}); result = _(list).chain().every(); result = _(list).chain().every(listIterator); result = _(list).chain().every('a'); result = _(list).chain().every(['a', 42]); - result = _(list).chain().every<{a: number}>({a: 42}); + result = _(list).chain().every({a: 42}); result = _(dictionary).chain().every(); result = _(dictionary).chain().every(dictionaryIterator); result = _(dictionary).chain().every('a'); result = _(dictionary).chain().every(['a', 42]); - result = _(dictionary).chain().every<{a: number}>({a: 42}); + result = _(dictionary).chain().every({a: 42}); result = _(numericDictionary).chain().every(); result = _(numericDictionary).chain().every(numericDictionaryIterator); @@ -3625,15 +3625,15 @@ namespace TestFilter { result = _.filter(array, listIterator); result = _.filter(array, ''); - result = _.filter<{a: number}, TResult>(array, {a: 42}); + result = _.filter(array, {a: 42}); result = _.filter(list, listIterator); result = _.filter(list, ''); - result = _.filter<{a: number}, TResult>(list, {a: 42}); + result = _.filter(list, {a: 42}); result = _.filter(dictionary, dictionaryIterator); result = _.filter(dictionary, ''); - result = _.filter<{a: number}, TResult>(dictionary, {a: 42}); + result = _.filter(dictionary, {a: 42}); } { @@ -3647,15 +3647,15 @@ namespace TestFilter { result = _(array).filter(listIterator); result = _(array).filter(''); - result = _(array).filter<{a: number}>({a: 42}); + result = _(array).filter({a: 42}); result = _(list).filter(listIterator); result = _(list).filter(''); - result = _(list).filter<{a: number}, TResult>({a: 42}); + result = _(list).filter({a: 42}); result = _(dictionary).filter(dictionaryIterator); result = _(dictionary).filter(''); - result = _(dictionary).filter<{a: number}, TResult>({a: 42}); + result = _(dictionary).filter({a: 42}); } { @@ -3669,15 +3669,15 @@ namespace TestFilter { result = _(array).chain().filter(listIterator); result = _(array).chain().filter(''); - result = _(array).chain().filter<{a: number}>({a: 42}); + result = _(array).chain().filter({a: 42}); result = _(list).chain().filter(listIterator); result = _(list).chain().filter(''); - result = _(list).chain().filter<{a: number}, TResult>({a: 42}); + result = _(list).chain().filter({a: 42}); result = _(dictionary).chain().filter(dictionaryIterator); result = _(dictionary).chain().filter(''); - result = _(dictionary).chain().filter<{a: number}, TResult>({a: 42}); + result = _(dictionary).chain().filter({a: 42}); } } @@ -3697,48 +3697,48 @@ namespace TestFind { result = _.find(array, listIterator, 1); result = _.find(array, ''); result = _.find(array, '', 1); - result = _.find<{a: number}, TResult>(array, {a: 42}); - result = _.find<{a: number}, TResult>(array, {a: 42}, 1); + result = _.find(array, {a: 42}); + result = _.find(array, {a: 42}, 1); result = _.find(list); result = _.find(list, listIterator); result = _.find(list, listIterator, 1); result = _.find(list, ''); result = _.find(list, '', 1); - result = _.find<{a: number}, TResult>(list, {a: 42}); - result = _.find<{a: number}, TResult>(list, {a: 42}, 1); + result = _.find(list, {a: 42}); + result = _.find(list, {a: 42}, 1); result = _.find(dictionary); result = _.find(dictionary, dictionaryIterator); result = _.find(dictionary, dictionaryIterator, 1); result = _.find(dictionary, ''); result = _.find(dictionary, '', 1); - result = _.find<{a: number}, TResult>(dictionary, {a: 42}); - result = _.find<{a: number}, TResult>(dictionary, {a: 42}, 1); + result = _.find(dictionary, {a: 42}); + result = _.find(dictionary, {a: 42}, 1); result = _(array).find(); result = _(array).find(listIterator); result = _(array).find(listIterator, 1); result = _(array).find(''); result = _(array).find('', 1); - result = _(array).find<{a: number}>({a: 42}); - result = _(array).find<{a: number}>({a: 42}, 1); + result = _(array).find({a: 42}); + result = _(array).find({a: 42}, 1); result = _(list).find(); result = _(list).find(listIterator); result = _(list).find(listIterator, 1); result = _(list).find(''); result = _(list).find('', 1); - result = _(list).find<{a: number}, TResult>({a: 42}); - result = _(list).find<{a: number}, TResult>({a: 42}, 1); + result = _(list).find({a: 42}); + result = _(list).find({a: 42}, 1); result = _(dictionary).find(); result = _(dictionary).find(dictionaryIterator); result = _(dictionary).find(dictionaryIterator, 1); result = _(dictionary).find(''); result = _(dictionary).find('', 1); - result = _(dictionary).find<{a: number}, TResult>({a: 42}); - result = _(dictionary).find<{a: number}, TResult>({a: 42}, 1); + result = _(dictionary).find({a: 42}); + result = _(dictionary).find({a: 42}, 1); } result = _.findLast([1, 2, 3, 4], function (num) { @@ -5014,25 +5014,25 @@ namespace TestSome { result = _.some(array, listIterator); result = _.some(array, 'a'); result = _.some(array, ['a', 42]); - result = _.some<{a: number}, SampleObject>(array, {a: 42}); + result = _.some(array, {a: 42}); result = _.some(list); result = _.some(list, listIterator); result = _.some(list, 'a'); result = _.some(list, ['a', 42]); - result = _.some<{a: number}, SampleObject>(list, {a: 42}); + result = _.some(list, {a: 42}); result = _.some(dictionary); result = _.some(dictionary, dictionaryIterator); result = _.some(dictionary, 'a'); result = _.some(dictionary, ['a', 42]); - result = _.some<{a: number}, SampleObject>(dictionary, {a: 42}); + result = _.some(dictionary, {a: 42}); result = _.some(numericDictionary); result = _.some(numericDictionary, numericDictionaryIterator); result = _.some(numericDictionary, 'a'); result = _.some(numericDictionary, ['a', 42]); - result = _.some<{a: number}, SampleObject>(numericDictionary, {a: 42}); + result = _.some(numericDictionary, {a: 42}); result = _.some(sampleObject); result = _.some(sampleObject, objectIterator); @@ -5044,31 +5044,31 @@ namespace TestSome { result = _(array).some(listIterator); result = _(array).some('a'); result = _(array).some(['a', 42]); - result = _(array).some<{a: number}>({a: 42}); + result = _(array).some({a: 42}); result = _(list).some(); result = _(list).some(listIterator); result = _(list).some('a'); result = _(list).some(['a', 42]); - result = _(list).some<{a: number}>({a: 42}); + result = _(list).some({a: 42}); result = _(dictionary).some(); result = _(dictionary).some(dictionaryIterator); result = _(dictionary).some('a'); result = _(dictionary).some(['a', 42]); - result = _(dictionary).some<{a: number}>({a: 42}); + result = _(dictionary).some({a: 42}); result = _(numericDictionary).some(); result = _(numericDictionary).some(numericDictionaryIterator); result = _(numericDictionary).some('a'); result = _(numericDictionary).some(['a', 42]); - result = _(numericDictionary).some<{a: number}>({a: 42}); + result = _(numericDictionary).some({a: 42}); result = _(sampleObject).some(); result = _(sampleObject).some(objectIterator); result = _(sampleObject).some('a'); result = _(sampleObject).some(['a', 42]); - result = _(sampleObject).some<{a: number}>({a: 42}); + result = _(sampleObject).some({a: 42}); } { @@ -5078,31 +5078,31 @@ namespace TestSome { result = _(array).chain().some(listIterator); result = _(array).chain().some('a'); result = _(array).chain().some(['a', 42]); - result = _(array).chain().some<{a: number}>({a: 42}); + result = _(array).chain().some({a: 42}); result = _(list).chain().some(); result = _(list).chain().some(listIterator); result = _(list).chain().some('a'); result = _(list).chain().some(['a', 42]); - result = _(list).chain().some<{a: number}>({a: 42}); + result = _(list).chain().some({a: 42}); result = _(dictionary).chain().some(); result = _(dictionary).chain().some(dictionaryIterator); result = _(dictionary).chain().some('a'); result = _(dictionary).chain().some(['a', 42]); - result = _(dictionary).chain().some<{a: number}>({a: 42}); + result = _(dictionary).chain().some({a: 42}); result = _(numericDictionary).chain().some(); result = _(numericDictionary).chain().some(numericDictionaryIterator); result = _(numericDictionary).chain().some('a'); result = _(numericDictionary).chain().some(['a', 42]); - result = _(numericDictionary).chain().some<{a: number}>({a: 42}); + result = _(numericDictionary).chain().some({a: 42}); result = _(sampleObject).chain().some(); result = _(sampleObject).chain().some(objectIterator); result = _(sampleObject).chain().some('a'); result = _(sampleObject).chain().some(['a', 42]); - result = _(sampleObject).chain().some<{a: number}>({a: 42}); + result = _(sampleObject).chain().some({a: 42}); } } diff --git a/lodash/meanBy/index.d.ts b/lodash/meanBy/index.d.ts index 3004930ef6..e4651a4412 100644 --- a/lodash/meanBy/index.d.ts +++ b/lodash/meanBy/index.d.ts @@ -1,3 +1,2 @@ -import * as _ from "../index"; -declare const meanBy: typeof _.meanBy; -export = meanBy; +import { meanBy } from "../index"; +export = meanBy; \ No newline at end of file diff --git a/lodash/scripts/generate-modules.ts b/lodash/scripts/generate-modules.ts index 127f1f44c6..395bb7ab4d 100644 --- a/lodash/scripts/generate-modules.ts +++ b/lodash/scripts/generate-modules.ts @@ -1,16 +1,124 @@ -// Usage: ts-node generate-modules +// Usage: ts-node generate-modules.ts /// import * as fs from "fs"; +import { get, STATUS_CODES } from "http"; +import * as path from "path"; -for (const module of allModuleNames()) { - if (!fs.existsSync(module)) { - fs.mkdirSync(module); +main().catch(console.error); + +async function main() { + const all = new Set(allModuleNames()); + const notOnNpm = new Set(modulesNotOnNpm()); + for (const n of notOnNpm) { + if (!all.has(n)) { + throw new Error(n); + } + } + + for (const module of all) { + console.log(module); + + // Generate local module + const localDir = path.join("..", module); + ensureDir(localDir); + fs.writeFileSync(path.join(localDir, "index.d.ts"), `import { ${module} } from "../index";\nexport = ${module};`); + + // Generate non-local module + if (!notOnNpm.has(module)) { + const dir = path.join("..", "..", `lodash.${module.toLowerCase()}`); + ensureDir(dir); + fs.writeFileSync(path.join(dir, "index.d.ts"), await globalDefinitionText(module)); + fs.writeFileSync(path.join(dir, "tsconfig.json"), tsconfig()); + fs.writeFileSync(path.join(dir, "tslint.json"), tslint()); + } } - fs.writeFileSync(`${module}/index.d.ts`, `import { ${module} } from "../index";\nexport = ${module};`); } +function ensureDir(dir: string) { + if (!fs.existsSync(dir)) { + fs.mkdirSync(dir); + } +} + +async function globalDefinitionText(moduleName: string): Promise { + const fullName = "lodash." + moduleName; + const url = `http://registry.npmjs.org/${fullName.toLowerCase()}`; + const npmInfo = JSON.parse(await loadString(url)); + const fullVersion = npmInfo["dist-tags"].latest; + const majorMinor = fullVersion.split(".").slice(0, 2).join("."); + + return ` +// Type definitions for ${fullName} ${majorMinor} +// Project: http://lodash.com/ +// Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +import { ${moduleName} } from "lodash"; +export = ${moduleName}; +`.trim() + "\n"; +} + +function tsconfig() { + return JSON.stringify({ + "files": [ + "index.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } + }, undefined, 4); +} + +function tslint() { + return JSON.stringify({ + "extends": "../tslint.json" + }, undefined, 4); +} + + +function loadString(url: string): Promise { + return new Promise((resolve, reject) => { + get(url, (res) => { + if (res.statusCode !== 200) { + return reject(new Error(`HTTP Error ${res.statusCode}: ${STATUS_CODES[res.statusCode || 500]} for ${url}`)) + } + let rawData = "" + res.on("data", chunk => rawData += chunk) + res.on("end", () => resolve(rawData)) + }).on("error", e => reject(e)) + }) +} + +function modulesNotOnNpm() { + return [ + "chain", + "each", + "eachRight", + "extend", + "extendWith", + "noConflict", + "runInContext", + "tap", + "thru", + ]; +} + +// Note: "fb" is not a usual module, so it is made by hand. + function allModuleNames() { return [ "add", @@ -66,7 +174,6 @@ function allModuleNames() { "every", "extend", "extendWith", - "fb", "fill", "filter", "find", diff --git a/lodash/scripts/tsconfig.json b/lodash/scripts/tsconfig.json new file mode 100644 index 0000000000..a06b8ed24f --- /dev/null +++ b/lodash/scripts/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "target": "es6", + "baseUrl": "../..", + "typeRoots": [ + "../../" + ], + "types": [] + } +} \ No newline at end of file diff --git a/sequelize-fixtures/index.d.ts b/sequelize-fixtures/index.d.ts index 2810e7b2ea..b865d91d0c 100644 --- a/sequelize-fixtures/index.d.ts +++ b/sequelize-fixtures/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/domasx2/sequelize-fixtures // Definitions by: Christian Schwarz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 /// diff --git a/sequelize/index.d.ts b/sequelize/index.d.ts index a2a9b6380c..6ff2c3e6df 100644 --- a/sequelize/index.d.ts +++ b/sequelize/index.d.ts @@ -2,6 +2,7 @@ // Project: http://sequelizejs.com // Definitions by: samuelneff , Peter Harris , Ivan Drinchev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 // Based on original work by: samuelneff diff --git a/sequelize/v3/index.d.ts b/sequelize/v3/index.d.ts index 8b22524878..81a4eab0ed 100644 --- a/sequelize/v3/index.d.ts +++ b/sequelize/v3/index.d.ts @@ -2,6 +2,7 @@ // Project: http://sequelizejs.com // Definitions by: samuelneff , Peter Harris , Ivan Drinchev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 // Based on original work by: samuelneff diff --git a/umzug/index.d.ts b/umzug/index.d.ts index 0395d09fd7..af3618df7e 100644 --- a/umzug/index.d.ts +++ b/umzug/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/sequelize/umzug // Definitions by: Ivan Drinchev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 /// ///