@types/phoenix
Advanced tools
Comparing version 1.4.4 to 1.5.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for phoenix 1.4 | ||
// Type definitions for phoenix 1.5 | ||
// Project: https://github.com/phoenixframework/phoenix | ||
@@ -10,8 +10,3 @@ // Definitions by: Mirosław Ciastek <https://github.com/mciastek> | ||
export class Push { | ||
constructor( | ||
channel: Channel, | ||
event: string, | ||
payload: object, | ||
timeout: number, | ||
); | ||
constructor(channel: Channel, event: string, payload: object, timeout: number); | ||
@@ -55,4 +50,7 @@ send(): void; | ||
rejoinAfterMs: (tries: number) => number; | ||
vsn: string; | ||
} | ||
export type MessageRef = string; | ||
export class Socket { | ||
@@ -76,8 +74,9 @@ constructor(endPoint: string, opts?: Partial<SocketConnectOption>); | ||
onOpen(callback: (cb: any) => void): void; | ||
onClose(callback: (cb: any) => void): void; | ||
onError(callback: (cb: any) => void): void; | ||
onMessage(callback: (cb: any) => void): void; | ||
onOpen(callback: (cb: any) => void): MessageRef; | ||
onClose(callback: (cb: any) => void): MessageRef; | ||
onError(callback: (cb: any) => void): MessageRef; | ||
onMessage(callback: (cb: any) => void): MessageRef; | ||
makeRef(): string; | ||
makeRef(): MessageRef; | ||
off(refs: MessageRef[]): void; | ||
} | ||
@@ -102,3 +101,3 @@ | ||
export class Ajax { | ||
static states: {[state: string]: number}; | ||
static states: { [state: string]: number }; | ||
@@ -112,3 +111,3 @@ static request( | ||
ontimeout?: any, | ||
callback?: (response?: any) => void | ||
callback?: (response?: any) => void, | ||
): void; | ||
@@ -123,3 +122,3 @@ | ||
ontimeout?: any, | ||
callback?: (response?: any) => void | ||
callback?: (response?: any) => void, | ||
): void; | ||
@@ -135,3 +134,3 @@ | ||
ontimeout?: any, | ||
callback?: (response?: any) => void | ||
callback?: (response?: any) => void, | ||
): void; | ||
@@ -157,3 +156,3 @@ | ||
onJoin?: PresenceOnJoinCallback, | ||
onLeave?: PresenceOnLeaveCallback | ||
onLeave?: PresenceOnLeaveCallback, | ||
): any; | ||
@@ -163,24 +162,13 @@ | ||
currentState: object, | ||
diff: {joins: object; leaves: object}, | ||
diff: { joins: object; leaves: object }, | ||
onJoin?: PresenceOnJoinCallback, | ||
onLeave?: PresenceOnLeaveCallback | ||
onLeave?: PresenceOnLeaveCallback, | ||
): any; | ||
static list<T = any>( | ||
presences: object, | ||
chooser?: (key: string, presence: any) => T, | ||
): T[]; | ||
static list<T = any>(presences: object, chooser?: (key: string, presence: any) => T): T[]; | ||
} | ||
export type PresenceOnJoinCallback = ( | ||
key?: string, | ||
currentPresence?: any, | ||
newPresence?: any | ||
) => void; | ||
export type PresenceOnJoinCallback = (key?: string, currentPresence?: any, newPresence?: any) => void; | ||
export type PresenceOnLeaveCallback = ( | ||
key?: string, | ||
currentPresence?: any, | ||
newPresence?: any | ||
) => void; | ||
export type PresenceOnLeaveCallback = (key?: string, currentPresence?: any, newPresence?: any) => void; | ||
@@ -190,1 +178,8 @@ export interface PresenceOpts { | ||
} | ||
export class Timer { | ||
constructor(callback: () => void, timerCalc: (tries: number) => number); | ||
reset(): void; | ||
scheduleTimeout(): void; | ||
} |
{ | ||
"name": "@types/phoenix", | ||
"version": "1.4.4", | ||
"version": "1.5.0", | ||
"description": "TypeScript definitions for phoenix", | ||
@@ -32,4 +32,4 @@ "license": "MIT", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "7603eeef4b0893c6a18a4bbdee8e045bf1f26a5f39520f5707031fc19c8f5c2c", | ||
"typeScriptVersion": "2.8" | ||
"typesPublisherContentHash": "98d87cec8b7be59a9d2bf26b4fc4ad673d7c84022b61ba068b5996a78f05fbbd", | ||
"typeScriptVersion": "3.0" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Wed, 08 Apr 2020 23:42:12 GMT | ||
* Last updated: Mon, 27 Jul 2020 01:16:34 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: none |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7605
137