diff --git a/README.md b/README.md index 5fdb79057..c63061ceb 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,20 @@ and then: ``` +### Typescript + +We've provided typescript declarations since v5.1.0. Most things should work +out of the box but if you need access to specific types you can import them +like so: + +``` +import Pusher from 'pusher-js'; +import * as PusherTypes from 'pusher-js'; + +var presenceChannel: PusherTypes.PresenceChannel; +... +``` + ### React Native **Warning it's now necessary to install