From fcc78898d3baf2e1ed7c45f693fdc4e2aaf94530 Mon Sep 17 00:00:00 2001 From: Victor Palomo de Castro Date: Sat, 11 Mar 2017 23:56:50 -0300 Subject: [PATCH 01/18] Added positions prop for DrawerLayoutAndroidStatic --- react-native/index.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/react-native/index.d.ts b/react-native/index.d.ts index 35a7eae5ce..c0d1884a97 100644 --- a/react-native/index.d.ts +++ b/react-native/index.d.ts @@ -2563,8 +2563,18 @@ declare module "react" { ref?: Ref } + interface DrawerPosition { + Left: number + Right: number + } + export interface DrawerLayoutAndroidStatic extends NativeMethodsMixin, React.ClassicComponentClass { + /** + * drawer's positions. + */ + positions: DrawerPosition + /** * Opens the drawer. */ From 9ad681855ff9b53e76e5057db01b8197ad458b73 Mon Sep 17 00:00:00 2001 From: Geert Jansen Date: Tue, 14 Mar 2017 11:59:33 +0100 Subject: [PATCH 02/18] Update to IBottomSheetOptions Adds missing bindToController property on interface IBottomSheetOptions. --- angular-material/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/angular-material/index.d.ts b/angular-material/index.d.ts index 0e27fe3b60..64441a96be 100644 --- a/angular-material/index.d.ts +++ b/angular-material/index.d.ts @@ -18,6 +18,7 @@ declare module 'angular' { controller?: string | Function; locals?: { [index: string]: any }; clickOutsideToClose?: boolean; + bindToController?: boolean; // default: false disableBackdrop?: boolean; escapeToClose?: boolean; resolve?: { [index: string]: () => angular.IPromise }; From adcadc8b7cb1a3d69a00925b68ed88a2c77a7ae2 Mon Sep 17 00:00:00 2001 From: NomiBernard Date: Tue, 14 Mar 2017 15:35:33 +0100 Subject: [PATCH 03/18] fix transaction callback return type return bluebird instead of T --- bookshelf/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookshelf/index.d.ts b/bookshelf/index.d.ts index 4aa6fd38b5..c7947579c8 100644 --- a/bookshelf/index.d.ts +++ b/bookshelf/index.d.ts @@ -17,7 +17,7 @@ interface Bookshelf extends Bookshelf.Events { Collection: typeof Bookshelf.Collection; plugin(name: string | string[] | Function, options?: any): Bookshelf; - transaction(callback: (transaction: knex.Transaction) => T): BlueBird; + transaction(callback: (transaction: knex.Transaction) => BlueBird): BlueBird; } declare function Bookshelf(knex: knex): Bookshelf; From 03a3f340e457dbb28f5abafc655eaa496afd1720 Mon Sep 17 00:00:00 2001 From: Geert Jansen Date: Wed, 15 Mar 2017 09:49:37 +0100 Subject: [PATCH 04/18] Add name to header --- angular-material/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angular-material/index.d.ts b/angular-material/index.d.ts index 64441a96be..a8196269a4 100644 --- a/angular-material/index.d.ts +++ b/angular-material/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Angular Material (angular.material module) 1.1 // Project: https://github.com/angular/material -// Definitions by: Blake Bigelow , Peter Hajdu , Davide Donadello +// Definitions by: Blake Bigelow , Peter Hajdu , Davide Donadello , Geert Jansen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as angular from 'angular'; From 32a3eb210b95afa9264db68b07ba3a16cf6d32da Mon Sep 17 00:00:00 2001 From: stonio Date: Wed, 15 Mar 2017 16:17:10 +0100 Subject: [PATCH 05/18] Update index.d.ts - Interface SpeakingURLOptions Rename interface `Options` to interface `SpeakingURLOptions` to avoid namespace conflict with other TypeScript definitions. --- speakingurl/index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/speakingurl/index.d.ts b/speakingurl/index.d.ts index 289c1eb033..83e38fd7b8 100644 --- a/speakingurl/index.d.ts +++ b/speakingurl/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for speakingurl 10.0 +// Type definitions for speakingurl 13.0 // Project: http://pid.github.io/speakingurl/ // Definitions by: Zlatko Andonovski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -7,7 +7,7 @@ interface Dictionary { [x: string]: T; } -interface Options { +interface SpeakingURLOptions { separator?: string; lang?: string|boolean; symbols?: boolean; @@ -20,10 +20,10 @@ interface Options { custom?: string[]|Dictionary; } -declare function getSlug(input: string, options?: Options|string): string; +declare function getSlug(input: string, options?: SpeakingURLOptions|string): string; declare namespace getSlug { - export function createSlug(options: Options): (input: string) => string; + export function createSlug(options: SpeakingURLOptions): (input: string) => string; } -export = getSlug; \ No newline at end of file +export = getSlug; From a15660c3c2bd064d68dd1ce8376ee833996c7671 Mon Sep 17 00:00:00 2001 From: Victor Palomo de Castro Date: Wed, 15 Mar 2017 21:08:41 -0300 Subject: [PATCH 06/18] Change drawerPosition type so it can match with DrawerPosition --- react-native/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/react-native/index.d.ts b/react-native/index.d.ts index c0d1884a97..62a7091e9f 100644 --- a/react-native/index.d.ts +++ b/react-native/index.d.ts @@ -2500,9 +2500,9 @@ declare module "react" { /** * Specifies the side of the screen from which the drawer will slide in. - * enum(DrawerConsts.DrawerPosition.Left, DrawerConsts.DrawerPosition.Right) + * enum(DrawerLayoutAndroid.positions.Left, DrawerLayoutAndroid.positions.Right) */ - drawerPosition?: any; + drawerPosition?: number; /** * Specifies the width of the drawer, more precisely the width of the From ca622833a6a6d975e37ec74beae0b0be63f63f07 Mon Sep 17 00:00:00 2001 From: Wouter Hardeman Date: Thu, 16 Mar 2017 18:34:54 +0100 Subject: [PATCH 07/18] Updated @types/react-paginate to version 4.2.0 --- react-paginate/index.d.ts | 24 +++++++++++++++++------- react-paginate/react-paginate-tests.tsx | 2 +- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/react-paginate/index.d.ts b/react-paginate/index.d.ts index aaa3931b74..fa1d928ce0 100644 --- a/react-paginate/index.d.ts +++ b/react-paginate/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for react-paginate 2.1.3 +// Type definitions for react-paginate 4.2.0 // Project: https://github.com/AdeleD/react-paginate -// Definitions by: Simon Hartcher +// Definitions by: Simon Hartcher , Wouter Hardeman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 @@ -10,7 +10,7 @@ interface ReactPaginateProps { /** * The total number of pages. */ - pageNum: number; + pageCount: number; /** * The range of pages displayed. @@ -43,19 +43,24 @@ interface ReactPaginateProps { breakClassName?: string | JSX.Element; /** - * The method to call when a page is clicked. + * The method to call when a page is clicked. Exposes the current page object as an argument. */ - clickCallback?: Function; + onPageChange?: Function; /** * The initial page selected. */ - initialSelected?: number; + initialPage?: number; /** * To override selected page with parent prop. */ - forceSelected?: number; + forcePage?: number; + + /** + * Disable `onPageChange` callback with initial page. Default: `false` + */ + disableInitialCallback?: boolean /** * The classname of the pagination container. @@ -101,6 +106,11 @@ interface ReactPaginateProps { * The classname for disabled `previous` and `next` buttons. */ disabledClassName?: string; + + /** + * The method is called to generate the `href` attribute value on tag `a` of each page element. + */ + hrefBuilder?: Function; } declare const ReactPaginate: React.ComponentClass; diff --git a/react-paginate/react-paginate-tests.tsx b/react-paginate/react-paginate-tests.tsx index 2ae495eacf..42a7c49c30 100644 --- a/react-paginate/react-paginate-tests.tsx +++ b/react-paginate/react-paginate-tests.tsx @@ -5,7 +5,7 @@ class Test extends React.Component<{}, {}> { public render() { return ( From 366da3f3c3eaff47db425846ef43011fb8e6e66e Mon Sep 17 00:00:00 2001 From: Wouter Hardeman Date: Thu, 16 Mar 2017 18:46:20 +0100 Subject: [PATCH 08/18] Added 'v' before version number to follow the guidelines --- react-paginate/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-paginate/index.d.ts b/react-paginate/index.d.ts index fa1d928ce0..363aeb8ea1 100644 --- a/react-paginate/index.d.ts +++ b/react-paginate/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-paginate 4.2.0 +// Type definitions for react-paginate v4.2.0 // Project: https://github.com/AdeleD/react-paginate // Definitions by: Simon Hartcher , Wouter Hardeman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 8a5f3b9db713fce3c1da6daa71626fca2b42c8aa Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Thu, 16 Mar 2017 19:09:45 +0100 Subject: [PATCH 09/18] the click callback accepts an event as its third param See https://github.com/electron/electron/blob/6d45052eeaf57faf239523b1b328cf37281ae030/lib/browser/api/menu-item.js#L52 --- electron/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electron/index.d.ts b/electron/index.d.ts index 0b98ae1944..b5a657ab61 100644 --- a/electron/index.d.ts +++ b/electron/index.d.ts @@ -2492,7 +2492,7 @@ declare namespace Electron { /** * Callback when the menu item is clicked. */ - click?: (menuItem: MenuItem, browserWindow: BrowserWindow) => void; + click?: (menuItem: MenuItem, browserWindow: BrowserWindow, event: Event) => void; /** * Can be normal, separator, submenu, checkbox or radio. */ From a207b07344f3720ca65c218a8766d8f7d1379f4b Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Thu, 16 Mar 2017 19:10:12 +0100 Subject: [PATCH 10/18] Fix signature for menu item click instance method See https://github.com/electron/electron/blob/6d45052eeaf57faf239523b1b328cf37281ae030/lib/browser/api/menu-item.js#L44 --- electron/index.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/electron/index.d.ts b/electron/index.d.ts index b5a657ab61..c7ba10f83c 100644 --- a/electron/index.d.ts +++ b/electron/index.d.ts @@ -2455,7 +2455,11 @@ declare namespace Electron { */ constructor(options: MenuItemOptions); - click: (menuItem: MenuItem, browserWindow: BrowserWindow, event: Event) => void; + /** + * A Function that is fired when the MenuItem recieves a click event + */ + click: (event: Event, browserWindow: BrowserWindow, webContents: WebContents) => void; + /** * Read-only property. */ From 021ee30fe2aff40307a6cd4f3f00894f9c64c995 Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Thu, 16 Mar 2017 19:10:25 +0100 Subject: [PATCH 11/18] Add tests to verify new signatures --- electron/test/main.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/electron/test/main.ts b/electron/test/main.ts index 276a15d851..35a85a81dc 100644 --- a/electron/test/main.ts +++ b/electron/test/main.ts @@ -531,12 +531,19 @@ var winWindows = new BrowserWindow({ // menu-item // https://github.com/atom/electron/blob/master/docs/api/menu-item.md -var menuItem = new MenuItem({}); +var menuItem = new MenuItem({ + click: (menuItem: Electron.MenuItem, browserWindow: Electron.BrowserWindow, event: Electron.Event) => { + console.log('click', menuItem, browserWindow, event); + } +}); + +const fakeEvent: Electron.Event = { + preventDefault: () => { }, + sender: winWindows.webContents, +} menuItem.label = 'Hello World!'; -menuItem.click = (menuItem, browserWindow) => { - console.log('click', menuItem, browserWindow); -}; +menuItem.click(fakeEvent, winWindows, winWindows.webContents) // menu // https://github.com/atom/electron/blob/master/docs/api/menu.md From 262a66c3090af69a4d328bdbe70aae662353206a Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Thu, 16 Mar 2017 21:37:31 +0100 Subject: [PATCH 12/18] Add myself to the definitions list --- electron/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electron/index.d.ts b/electron/index.d.ts index c7ba10f83c..3fab5cdf63 100644 --- a/electron/index.d.ts +++ b/electron/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Electron v1.4.8 // Project: http://electron.atom.io/ -// Definitions by: jedmao , rhysd , Milan Burda , aliib , Daniel Perez Alvarez +// Definitions by: jedmao , rhysd , Milan Burda , aliib , Daniel Perez Alvarez , Markus Olsson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// From a6c1c773a5aca88aa4ef7ecdd64c71af488b4b43 Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Fri, 17 Mar 2017 00:32:16 +0100 Subject: [PATCH 13/18] Spelling --- electron/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electron/index.d.ts b/electron/index.d.ts index 3fab5cdf63..11103b3a18 100644 --- a/electron/index.d.ts +++ b/electron/index.d.ts @@ -2456,7 +2456,7 @@ declare namespace Electron { constructor(options: MenuItemOptions); /** - * A Function that is fired when the MenuItem recieves a click event + * A function that is fired when the MenuItem receives a click event */ click: (event: Event, browserWindow: BrowserWindow, webContents: WebContents) => void; From e3385bf72b718e9f59bc4a1205a266ed15c341c6 Mon Sep 17 00:00:00 2001 From: andy-ms Date: Thu, 16 Mar 2017 20:17:28 -0700 Subject: [PATCH 14/18] Add 'dir-resolve' --- dir-resolve/dir-resolve-tests.ts | 3 +++ dir-resolve/index.d.ts | 7 +++++++ dir-resolve/tsconfig.json | 22 ++++++++++++++++++++++ dir-resolve/tslint.json | 1 + 4 files changed, 33 insertions(+) create mode 100644 dir-resolve/dir-resolve-tests.ts create mode 100644 dir-resolve/index.d.ts create mode 100644 dir-resolve/tsconfig.json create mode 100644 dir-resolve/tslint.json diff --git a/dir-resolve/dir-resolve-tests.ts b/dir-resolve/dir-resolve-tests.ts new file mode 100644 index 0000000000..d84f9d0efc --- /dev/null +++ b/dir-resolve/dir-resolve-tests.ts @@ -0,0 +1,3 @@ +import resolve = require("dir-resolve"); + +resolve("module/package"); diff --git a/dir-resolve/index.d.ts b/dir-resolve/index.d.ts new file mode 100644 index 0000000000..0b8f425b0b --- /dev/null +++ b/dir-resolve/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for dir-resolve 1.0 +// Project: https://github.com/mwinche/dir-resolve +// Definitions by: Andy Hanson +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function resolve(path: string): string; +export = resolve; diff --git a/dir-resolve/tsconfig.json b/dir-resolve/tsconfig.json new file mode 100644 index 0000000000..1748792b1d --- /dev/null +++ b/dir-resolve/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "dir-resolve-tests.ts" + ] +} \ No newline at end of file diff --git a/dir-resolve/tslint.json b/dir-resolve/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/dir-resolve/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } From 78d4a9d2962c16b9874399d26c49c97f6f79f0eb Mon Sep 17 00:00:00 2001 From: David Findley Date: Thu, 16 Mar 2017 22:48:35 -0500 Subject: [PATCH 15/18] jwt-simple: Adding optional 'algorithm' param to decode() --- jwt-simple/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jwt-simple/index.d.ts b/jwt-simple/index.d.ts index 1ae8f18519..b70aa8c720 100644 --- a/jwt-simple/index.d.ts +++ b/jwt-simple/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for jwt-simple v0.5.0 +// Type definitions for jwt-simple v0.5.1 // Project: https://github.com/hokaccha/node-jwt-simple // Definitions by: Ken Fukuyama , Gael Magnan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -11,7 +11,7 @@ * @param algorithm default is HS256 * @api public */ -export function decode(token: any, key: string, noVerify?: boolean): any; +export function decode(token: any, key: string, noVerify?: boolean, algorithm?: string): any; /** * Encode jwt * @param payload From 2d308d61818f8f860efeaa0b907e6c5dfb428d65 Mon Sep 17 00:00:00 2001 From: cailenmusselman Date: Fri, 17 Mar 2017 12:11:47 -0600 Subject: [PATCH 16/18] Android TextView now supports the native includeFontPadding property And it's exposed by react-native as a style property. Reference: https://facebook.github.io/react-native/docs/text.html --- react-native/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/react-native/index.d.ts b/react-native/index.d.ts index e120301923..884fd316aa 100644 --- a/react-native/index.d.ts +++ b/react-native/index.d.ts @@ -734,6 +734,7 @@ declare module "react" { export interface TextStyleAndroid extends ViewStyle { textAlignVertical?: "auto" | "top" | "bottom" | "center" + includeFontPadding?: boolean } // @see https://facebook.github.io/react-native/docs/text.html#style From fbed47f8cf462aa6436fe1877f0095f4c9812017 Mon Sep 17 00:00:00 2001 From: Eduardo Garcia Date: Sat, 18 Mar 2017 15:44:10 +0100 Subject: [PATCH 17/18] Add missing FileResizeOptions fields --- ng-file-upload/index.d.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ng-file-upload/index.d.ts b/ng-file-upload/index.d.ts index d9aadbd2d5..cc5a59b2bf 100644 --- a/ng-file-upload/index.d.ts +++ b/ng-file-upload/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for Angular File Upload 11.1.1 +// Type definitions for Angular File Upload 12.2 // Project: https://github.com/danialfarid/ng-file-upload -// Definitions by: John Reilly +// Definitions by: John Reilly , +// Eduardo Garcia // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -103,10 +104,12 @@ declare module 'angular' { interface FileResizeOptions { centerCrop?: boolean; height?: number; - ratio?: number; + pattern?: string; + ratio?: number | string; resizeIf?: ResizeIfFunction; restoreExif?: boolean; quality?: number; + type?: string; width?: number; } From 33f1fc02b72705132ddb57375858f7c47f34f895 Mon Sep 17 00:00:00 2001 From: Eduardo Garcia Date: Sat, 18 Mar 2017 15:44:29 +0100 Subject: [PATCH 18/18] Update tests with new FileResizeOptions fields --- ng-file-upload/ng-file-upload-tests.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ng-file-upload/ng-file-upload-tests.ts b/ng-file-upload/ng-file-upload-tests.ts index 08fbafdb6b..cc7f98d5bf 100644 --- a/ng-file-upload/ng-file-upload-tests.ts +++ b/ng-file-upload/ng-file-upload-tests.ts @@ -85,9 +85,11 @@ class UploadController { ratio: 0.9, centerCrop: true, restoreExif: true, - resizeIf: (width: number, height: number) => { + resizeIf: (width: number, height: number) => { return true; - } + }, + pattern: '.jpg', + type: 'image/jpeg' }) .then((resizedFile) => { console.log(resizedFile);