Skip to content
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

feat: export all types #1132

Merged
merged 1 commit into from Apr 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 12 additions & 1 deletion README.md
Expand Up @@ -30,6 +30,7 @@
* [Request Options](#request-options)
* [Using a Proxy](#using-a-proxy)
* [Supported APIs](#getting-supported-apis)
* [TypeScript](#typescript)
* [License](#license)
* [Contributing](#contributing)
* [Questions/problems?](#questionsproblems)
Expand Down Expand Up @@ -461,7 +462,17 @@ const {google} = require('googleapis');
const apis = google.getSupportedAPIs();
```

This will return an object with the API name as object property names, and an array of version strings as the object values;
This will return an object with the API name as object property names, and an array of version strings as the object values;

### TypeScript
This library is written in TypeScript, and provides types out of the box. Due to the shape of the API, in some cases you may need to use generics to get the appropriate types. This is only an issue for APIs that include multiple versions. For example, to use the Drive v3 API:

```ts
import {google, drive_v3} from 'googleapis';
const drive = google.drive<drive_v3.Drive>('v3');
```

All classes and interfaces generated for each API are exported under the `apiName_version` namespace.

## Release Notes & Breaking Changes
You can find a detailed list of breaking changes and new features in our [Release Notes][releasenotes]. If you've used this library before `25.x`, see our [Release Notes][releasenotes] to learn about migrating your code from `24.x.x` to `25.x.x`. It's pretty easy :)
Expand Down