From c4e9d77c1899652d9ed320f35ccd85bd7b6f5e29 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Thu, 29 Sep 2016 23:48:42 +0300 Subject: [PATCH 01/14] add id --- express-session/express-session.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/express-session/express-session.d.ts b/express-session/express-session.d.ts index 90e1ed07cc..0320ff1aed 100644 --- a/express-session/express-session.d.ts +++ b/express-session/express-session.d.ts @@ -10,11 +10,14 @@ declare namespace Express { export interface Request { session?: Session; + readonly sessionId: string; } export interface Session { [key: string]: any; + readonly id: string; + regenerate: (callback: (err: any) => void) => void; destroy: (callback: (err: any) => void) => void; reload: (callback: (err: any) => void) => void; From 9c8c07801e8c65631d9dc563d3ef1604ac009d4d Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Fri, 30 Sep 2016 00:00:15 +0300 Subject: [PATCH 02/14] remove readonly --- express-session/express-session.d.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/express-session/express-session.d.ts b/express-session/express-session.d.ts index 0320ff1aed..c685c8a1bb 100644 --- a/express-session/express-session.d.ts +++ b/express-session/express-session.d.ts @@ -10,13 +10,12 @@ declare namespace Express { export interface Request { session?: Session; - readonly sessionId: string; + sessionId?: string; } export interface Session { [key: string]: any; - - readonly id: string; + id: string; regenerate: (callback: (err: any) => void) => void; destroy: (callback: (err: any) => void) => void; From 5a0b946a42315f58b3f5fdd3de6dc70e9f24cfea Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Fri, 30 Sep 2016 01:16:45 +0300 Subject: [PATCH 03/14] add touch after --- connect-mongo/connect-mongo.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/connect-mongo/connect-mongo.d.ts b/connect-mongo/connect-mongo.d.ts index 49f93e2d46..7c779e2d07 100644 --- a/connect-mongo/connect-mongo.d.ts +++ b/connect-mongo/connect-mongo.d.ts @@ -78,6 +78,12 @@ declare module "connect-mongo" { * (Default: 10) */ autoRemoveInterval?: number; + + + /** + * don't save session if unmodified + */ + touchAfter?: number; } export interface MongoUrlOptions extends DefaultOptions { From 30b38b4e5a16967e9f4c07b4be5da58c04213700 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Fri, 30 Sep 2016 06:49:17 +0300 Subject: [PATCH 04/14] fix typo --- express-session/express-session.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/express-session/express-session.d.ts b/express-session/express-session.d.ts index c685c8a1bb..9af409ddc5 100644 --- a/express-session/express-session.d.ts +++ b/express-session/express-session.d.ts @@ -10,7 +10,7 @@ declare namespace Express { export interface Request { session?: Session; - sessionId?: string; + sessionID?: string; } export interface Session { From 2481a5dbb1457629c7313fb9f9a3dadb810120e0 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Mon, 10 Oct 2016 17:01:39 +0300 Subject: [PATCH 05/14] react-native-orientation --- .../react-native-orientation.d.ts | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 react-native-orientation/react-native-orientation.d.ts diff --git a/react-native-orientation/react-native-orientation.d.ts b/react-native-orientation/react-native-orientation.d.ts new file mode 100644 index 0000000000..0744ac86e2 --- /dev/null +++ b/react-native-orientation/react-native-orientation.d.ts @@ -0,0 +1,25 @@ +// Type definitions for react-native-orientation +// Project: https://github.com/yamill/react-native-orientation +// Definitions by: Moshe Atlow +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module 'react-native-orientation' { + + namespace Orientation { + type orientation = "LANDSCAPE" | "PORTRAIT" | "UNKNOWN" | "PORTRAITUPSIDEDOWN"; + type specificOrientation = "LANDSCAPE-LEFT" | "LANDSCAPE-RIGHT" | "PORTRAIT" | "UNKNOWN" | "PORTRAITUPSIDEDOWN"; + + export function addOrientationListener(callback: (orientation: orientation) => void): void; + export function removeOrientationListener(callback: (orientation: orientation) => void): void; + export function removeSpecificOrientationListener(callback: (orientation: specificOrientation) => void): void; + + + export function lockToPortrait(): void; + export function lockToLandscape(): void; + export function lockToLandscapeLeft(): void; + export function lockToLandscapeRight(): void; + export function unlockAllOrientations(): void; + export function getOrientation(callback: (err: Error, orientation: orientation) => void): void; + export function getSpecificOrientation(callback: (err: Error, orientation: specificOrientation) => void): void; + } +} From fd2f4e3cdb2cf5bb060c6fe0f9cd89a2d5baf7ab Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Mon, 10 Oct 2016 17:19:41 +0300 Subject: [PATCH 06/14] Update react-native-orientation.d.ts --- react-native-orientation/react-native-orientation.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/react-native-orientation/react-native-orientation.d.ts b/react-native-orientation/react-native-orientation.d.ts index 0744ac86e2..643727cea4 100644 --- a/react-native-orientation/react-native-orientation.d.ts +++ b/react-native-orientation/react-native-orientation.d.ts @@ -22,4 +22,6 @@ declare module 'react-native-orientation' { export function getOrientation(callback: (err: Error, orientation: orientation) => void): void; export function getSpecificOrientation(callback: (err: Error, orientation: specificOrientation) => void): void; } + + export = Orientation; } From f239708a49510fb1f71c58c97aa7eeb17ad21da7 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Mon, 10 Oct 2016 17:22:36 +0300 Subject: [PATCH 07/14] add tests --- .../react-native-orientation-tests.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 react-native-orientation/react-native-orientation-tests.ts diff --git a/react-native-orientation/react-native-orientation-tests.ts b/react-native-orientation/react-native-orientation-tests.ts new file mode 100644 index 0000000000..73d5adb188 --- /dev/null +++ b/react-native-orientation/react-native-orientation-tests.ts @@ -0,0 +1,16 @@ +/// + +import * as Orientation from 'react-native-orientation'; + +Orientation.addOrientationListener((orientation)=>{}); +Orientation.removeOrientationListener((orientation)=>{}); +Orientation.removeSpecificOrientationListener((orientation)=>{}); + +Orientation.lockToPortrait(); +Orientation.lockToPortrait(); +Orientation.lockToLandscape(); +Orientation.lockToLandscapeLeft(); +Orientation.lockToLandscapeRight(); +Orientation.unlockAllOrientations(); +Orientation.getOrientation((err,orientation)=>{})); +Orientation.getSpecificOrientation((err,orientation)=>{})); From 41e61a77a105182f3650c4e69265705dce7973ad Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Mon, 10 Oct 2016 19:13:57 +0300 Subject: [PATCH 08/14] fix typo --- react-native-orientation/react-native-orientation-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/react-native-orientation/react-native-orientation-tests.ts b/react-native-orientation/react-native-orientation-tests.ts index 73d5adb188..aa92c7db87 100644 --- a/react-native-orientation/react-native-orientation-tests.ts +++ b/react-native-orientation/react-native-orientation-tests.ts @@ -12,5 +12,5 @@ Orientation.lockToLandscape(); Orientation.lockToLandscapeLeft(); Orientation.lockToLandscapeRight(); Orientation.unlockAllOrientations(); -Orientation.getOrientation((err,orientation)=>{})); -Orientation.getSpecificOrientation((err,orientation)=>{})); +Orientation.getOrientation((err,orientation)=>{}); +Orientation.getSpecificOrientation((err,orientation)=>{}); From fa389c0a120a21db54e37840d76e5979a169d6c4 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Mon, 10 Oct 2016 21:48:14 +0300 Subject: [PATCH 09/14] Update react-native-orientation.d.ts --- react-native-orientation/react-native-orientation.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-native-orientation/react-native-orientation.d.ts b/react-native-orientation/react-native-orientation.d.ts index 643727cea4..54c497ef14 100644 --- a/react-native-orientation/react-native-orientation.d.ts +++ b/react-native-orientation/react-native-orientation.d.ts @@ -13,7 +13,7 @@ declare module 'react-native-orientation' { export function removeOrientationListener(callback: (orientation: orientation) => void): void; export function removeSpecificOrientationListener(callback: (orientation: specificOrientation) => void): void; - + export function getInitialOrientation(): orientation; export function lockToPortrait(): void; export function lockToLandscape(): void; export function lockToLandscapeLeft(): void; From 259018e6ad45267a510074ccf76e9675220f52b8 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Mon, 10 Oct 2016 21:49:41 +0300 Subject: [PATCH 10/14] Update react-native-orientation-tests.ts --- react-native-orientation/react-native-orientation-tests.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/react-native-orientation/react-native-orientation-tests.ts b/react-native-orientation/react-native-orientation-tests.ts index aa92c7db87..17c709ac16 100644 --- a/react-native-orientation/react-native-orientation-tests.ts +++ b/react-native-orientation/react-native-orientation-tests.ts @@ -6,6 +6,7 @@ Orientation.addOrientationListener((orientation)=>{}); Orientation.removeOrientationListener((orientation)=>{}); Orientation.removeSpecificOrientationListener((orientation)=>{}); +Orientation.getInitialOrientation(); Orientation.lockToPortrait(); Orientation.lockToPortrait(); Orientation.lockToLandscape(); From 8b6ab8a6477398e460b3285d35c179a5cdc4b96d Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Thu, 13 Oct 2016 10:31:02 +0300 Subject: [PATCH 11/14] add addOrientationListener --- react-native-orientation/react-native-orientation.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/react-native-orientation/react-native-orientation.d.ts b/react-native-orientation/react-native-orientation.d.ts index 54c497ef14..3e7549daec 100644 --- a/react-native-orientation/react-native-orientation.d.ts +++ b/react-native-orientation/react-native-orientation.d.ts @@ -11,7 +11,8 @@ declare module 'react-native-orientation' { export function addOrientationListener(callback: (orientation: orientation) => void): void; export function removeOrientationListener(callback: (orientation: orientation) => void): void; - export function removeSpecificOrientationListener(callback: (orientation: specificOrientation) => void): void; + export function addOrientationListener(callback: (specificOrientation: specificOrientation) => void): void; + export function removeSpecificOrientationListener(callback: (specificOrientation: specificOrientation) => void): void; export function getInitialOrientation(): orientation; export function lockToPortrait(): void; From bf071282ae2f7bbd8bc9eba9a24746bf04e36194 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Thu, 13 Oct 2016 10:31:29 +0300 Subject: [PATCH 12/14] Update react-native-orientation-tests.ts --- react-native-orientation/react-native-orientation-tests.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/react-native-orientation/react-native-orientation-tests.ts b/react-native-orientation/react-native-orientation-tests.ts index 17c709ac16..23e3c468c4 100644 --- a/react-native-orientation/react-native-orientation-tests.ts +++ b/react-native-orientation/react-native-orientation-tests.ts @@ -4,6 +4,7 @@ import * as Orientation from 'react-native-orientation'; Orientation.addOrientationListener((orientation)=>{}); Orientation.removeOrientationListener((orientation)=>{}); +Orientation.addSpecificOrientationListener((orientation)=>{}); Orientation.removeSpecificOrientationListener((orientation)=>{}); Orientation.getInitialOrientation(); From ae44092bd540c67c5a22a9ec9d0232797c2f8e02 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Thu, 13 Oct 2016 10:34:50 +0300 Subject: [PATCH 13/14] fix typo addOrientationListener => addSpecificOrientationListener --- react-native-orientation/react-native-orientation.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-native-orientation/react-native-orientation.d.ts b/react-native-orientation/react-native-orientation.d.ts index 3e7549daec..1ee7d6f929 100644 --- a/react-native-orientation/react-native-orientation.d.ts +++ b/react-native-orientation/react-native-orientation.d.ts @@ -11,7 +11,7 @@ declare module 'react-native-orientation' { export function addOrientationListener(callback: (orientation: orientation) => void): void; export function removeOrientationListener(callback: (orientation: orientation) => void): void; - export function addOrientationListener(callback: (specificOrientation: specificOrientation) => void): void; + export function addSpecificOrientationListener(callback: (specificOrientation: specificOrientation) => void): void; export function removeSpecificOrientationListener(callback: (specificOrientation: specificOrientation) => void): void; export function getInitialOrientation(): orientation; From c95ee63a5635ee935c3f17518d4d5d76e7d1cf83 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Thu, 13 Oct 2016 21:30:12 +0300 Subject: [PATCH 14/14] update to current api --- howlerjs/howler.d.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/howlerjs/howler.d.ts b/howlerjs/howler.d.ts index 9e245a8058..cdb95ce44f 100644 --- a/howlerjs/howler.d.ts +++ b/howlerjs/howler.d.ts @@ -4,8 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare class HowlerGlobal { - mute(): HowlerGlobal; - unmute(): HowlerGlobal; + mute(muted: boolean): HowlerGlobal; volume(): number; volume(volume: number): HowlerGlobal; codecs(extension: string): boolean; @@ -56,8 +55,7 @@ interface Howl { play(callback?: (soundId: string) => void): Howl; pause(soundId?: string): Howl; stop(soundId?: string): Howl; - mute(soundId?: string): Howl; - unmute(soundId?: string): Howl; + mute(muted?: boolean, soundId?: string): Howl; fade(from: number, to: number, duration: number, callback?: Function, soundId?: string): Howl; loop(): boolean; loop(loop: boolean): Howl;