Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Steven Masala
2017-03-20 15:51:05 +01:00
15 changed files with 102 additions and 31 deletions
+2 -1
View File
@@ -1,6 +1,6 @@
// Type definitions for Angular Material (angular.material module) 1.1
// Project: https://github.com/angular/material
// Definitions by: Blake Bigelow <https://github.com/blbigelow>, Peter Hajdu <https://github.com/PeterHajdu>, Davide Donadello <https://github.com/Dona278>
// Definitions by: Blake Bigelow <https://github.com/blbigelow>, Peter Hajdu <https://github.com/PeterHajdu>, Davide Donadello <https://github.com/Dona278>, Geert Jansen <https://github.com/geertjansen>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import * as angular from 'angular';
@@ -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<any> };
+1 -1
View File
@@ -17,7 +17,7 @@ interface Bookshelf extends Bookshelf.Events<any> {
Collection: typeof Bookshelf.Collection;
plugin(name: string | string[] | Function, options?: any): Bookshelf;
transaction<T>(callback: (transaction: knex.Transaction) => T): BlueBird<T>;
transaction<T>(callback: (transaction: knex.Transaction) => BlueBird<T>): BlueBird<T>;
}
declare function Bookshelf(knex: knex): Bookshelf;
+3
View File
@@ -0,0 +1,3 @@
import resolve = require("dir-resolve");
resolve("module/package");
+7
View File
@@ -0,0 +1,7 @@
// Type definitions for dir-resolve 1.0
// Project: https://github.com/mwinche/dir-resolve
// Definitions by: Andy Hanson <https://github.com/andy-ms>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function resolve(path: string): string;
export = resolve;
+22
View File
@@ -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"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "../tslint.json" }
+7 -3
View File
@@ -1,6 +1,6 @@
// Type definitions for Electron v1.4.8
// Project: http://electron.atom.io/
// Definitions by: jedmao <https://github.com/jedmao/>, rhysd <https://rhysd.github.io>, Milan Burda <https://github.com/miniak/>, aliib <https://github.com/aliib>, Daniel Perez Alvarez <https://github.com/unindented>
// Definitions by: jedmao <https://github.com/jedmao/>, rhysd <https://rhysd.github.io>, Milan Burda <https://github.com/miniak/>, aliib <https://github.com/aliib>, Daniel Perez Alvarez <https://github.com/unindented>, Markus Olsson <https://github.com/niik>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
@@ -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 receives a click event
*/
click: (event: Event, browserWindow: BrowserWindow, webContents: WebContents) => void;
/**
* Read-only property.
*/
@@ -2492,7 +2496,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.
*/
+11 -4
View File
@@ -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
+2 -2
View File
@@ -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 <https://github.com/kenfdev>, Gael Magnan <https://github.com/GaelMagnan>
// 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
+6 -3
View File
@@ -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 <https://github.com/johnnyreilly>
// Definitions by: John Reilly <https://github.com/johnnyreilly>,
// Eduardo Garcia <https://github.com/thewarpaint>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="angular" />
@@ -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;
}
+4 -2
View File
@@ -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);
+13 -2
View File
@@ -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
@@ -2500,9 +2501,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
@@ -2563,8 +2564,18 @@ declare module "react" {
ref?: Ref<DrawerLayoutAndroidStatic & ViewStatic>
}
interface DrawerPosition {
Left: number
Right: number
}
export interface DrawerLayoutAndroidStatic extends NativeMethodsMixin, React.ClassicComponentClass<DrawerLayoutAndroidProperties> {
/**
* drawer's positions.
*/
positions: DrawerPosition
/**
* Opens the drawer.
*/
+17 -7
View File
@@ -1,6 +1,6 @@
// Type definitions for react-paginate 2.1.3
// Type definitions for react-paginate v4.2.0
// Project: https://github.com/AdeleD/react-paginate
// Definitions by: Simon Hartcher <https://github.com/deevus>
// Definitions by: Simon Hartcher <https://github.com/deevus>, Wouter Hardeman <https://github.com/wouterhardeman>
// 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<ReactPaginateProps>;
+1 -1
View File
@@ -5,7 +5,7 @@ class Test extends React.Component<{}, {}> {
public render() {
return (
<ReactPaginate
pageNum={1}
pageCount={1}
pageRangeDisplayed={10}
marginPagesDisplayed={2}
/>
+5 -5
View File
@@ -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 <https://github.com/Goldsmith42/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -7,7 +7,7 @@ interface Dictionary<T> {
[x: string]: T;
}
interface Options {
interface SpeakingURLOptions {
separator?: string;
lang?: string|boolean;
symbols?: boolean;
@@ -20,10 +20,10 @@ interface Options {
custom?: string[]|Dictionary<string>;
}
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;
export = getSlug;