From 7880953ff924baaefde5ad8c47239f9c1d71b854 Mon Sep 17 00:00:00 2001 From: ntziolis Date: Mon, 19 Oct 2020 17:30:09 +0200 Subject: [PATCH] fix(typings): revert to previous typings + remove export of strava const (#102) --- README.md | 10 ++++++++++ index.d.ts | 5 ++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index df01f90..5200056 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,16 @@ Supports many but not all Strava API endpoints: npm install strava-v3 ``` +## Import syntax +Importing only the library: +``` +import strava from 'strava-v3'; +``` +Importing both the library as well as interfaces: +``` +import { default as strava, Strava } from 'strava-v3'; +``` + ## Quick start * Create an application at [strava.com/settings/api](https://www.strava.com/settings/api) and make note of your `access_token` diff --git a/index.d.ts b/index.d.ts index 647e5e4..dea61c5 100644 --- a/index.d.ts +++ b/index.d.ts @@ -155,6 +155,5 @@ export interface Strava { oauth: OAuthRoutes; } -declare const strava : Strava; -export = strava; -export as namespace strava; +declare const strava: Strava; +export default strava;