Skip to content

Commit b694df4

Browse files
🤖 Merge PR DefinitelyTyped#74189 [phoenix] Add authToken option to SocketConnectOption by @thisistonydang
1 parent a997816 commit b694df4

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎types/phoenix/index.d.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export type BinaryType = "arraybuffer" | "blob";
3434
export type ConnectionState = "connecting" | "open" | "closing" | "closed";
3535

3636
export interface SocketConnectOption {
37+
authToken: string;
3738
binaryType: BinaryType;
3839
params: object | (() => object);
3940
transport: new(endpoint: string) => object;

‎types/phoenix/phoenix-tests.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class InMemoryStorage {
1919

2020
function test_socket() {
2121
const socket = new Socket("/ws", {
22+
authToken: "my-secret-token",
2223
binaryType: "arraybuffer",
2324
params: { userToken: "123" },
2425
reconnectAfterMs: tries => 1000,

0 commit comments

Comments
 (0)