From 62c1e7e4af2ed9c3d9e41bee07df60fc9fe85262 Mon Sep 17 00:00:00 2001 From: James Lees Date: Tue, 11 Feb 2020 12:03:19 +0000 Subject: [PATCH] mention ts declarations in README --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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