-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript Support #22
Comments
I started drafting up something like this for an import { StoreCreator } from 'redux'
import Options from 'pusher-js/src/core/options'
import Pusher from 'pusher-js/src/core/pusher'
declare module "pusher-redux" {
export function setPusherClient(
PusherClient: Pusher
): any;
export function configurePusher(
store: StoreCreator,
apiKey: string,
options?: Options
): any;
export function delayConfiguration(
store: StoreCreator,
apiKey: string,
options?: Options
): any;
export function startConfiguration(
options?: Options
): any;
export function subscribe(
channelName: string,
eventName: string,
actionType: string,
additionalParams: any
): any;
export function unsubscribe(
channelName: string,
eventName: string,
actionType: string,
): any;
export function getChannel(
channelName: string
): any;
export function disconnect(): any;
let CONNECTED: string;
let DISCONNECTED: string;
let CONNECTING: string;
let UNAVAILABLE: string;
let FAILED: string;
}``` |
hey @tristanhcole As for your code it's a great start, it can be polished further of course, but hopefully, you and others find it useful already. |
No worries @TheRusskiy! Thanks for the reply. I'll try to improve the typing of these and put in a PR once it's further along |
@tristanhcole any updates on the TS support? |
Is it possible to add types to this package?
The text was updated successfully, but these errors were encountered: