-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28116 from kubabutkiewicz/ts-migration/Pusher-lib
[No QA] [TS migration] Migrate 'Pusher' lib to TypeScript
- Loading branch information
Showing
10 changed files
with
138 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ export default { | |
MULTIPLE_EVENT_TYPE: { | ||
ONYX_API_UPDATE: 'onyxApiUpdate', | ||
}, | ||
}; | ||
} as const; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
* We use the pusher-js/react-native module to support pusher on native environments. | ||
* @see: https://github.com/pusher/pusher-js | ||
*/ | ||
import PusherImplementation from 'pusher-js/react-native'; | ||
import Pusher from './types'; | ||
|
||
const PusherNative: Pusher = PusherImplementation; | ||
|
||
export default PusherNative; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
* We use the standard pusher-js module to support pusher on web environments. | ||
* @see: https://github.com/pusher/pusher-js | ||
*/ | ||
import PusherImplementation from 'pusher-js/with-encryption'; | ||
import type Pusher from './types'; | ||
|
||
const PusherWeb: Pusher = PusherImplementation; | ||
|
||
export default PusherWeb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import PusherClass from 'pusher-js/with-encryption'; | ||
import {LiteralUnion} from 'type-fest'; | ||
|
||
type Pusher = typeof PusherClass; | ||
|
||
type SocketEventName = LiteralUnion<'error' | 'connected' | 'disconnected' | 'state_change', string>; | ||
|
||
export default Pusher; | ||
|
||
export type {SocketEventName}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.