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;