Skip to content

Commit

Permalink
feat(typings): Update TypeScript declaration file for new API (#316)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This replaces the 4.X declaration file.

Fixes #249
  • Loading branch information
silasbw committed Aug 28, 2018
1 parent 3a2886c commit fe3a131
Show file tree
Hide file tree
Showing 5 changed files with 5,474 additions and 232 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,19 @@ specifications:
* [Kubernetes API v1.9](docs/1.9.md)
* [Kubernetes API v1.10](docs/1.10.md)

## TypeScript

kubernetes-client includes a typings declartion file for Kubernetes
API 1.10 and a complimentry `Client1_10` class:

```typescript
import * as Api from 'kubernetes-client';

const Client = Api.Client1_10;
const config = Api.config;
const client = new Client({ config: config.fromKubeconfig() });
```

## More examples

[examples/](examples/) has snippets for using kubernetes-client:
Expand Down
1 change: 1 addition & 0 deletions scripts/templates/ts-namespace.mustache
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Generated by `npm run typings`
declare namespace KubernetesClient {
const Client{{clientSuffix}}: ApiClient
const config: Configuration
Expand Down
Loading

0 comments on commit fe3a131

Please sign in to comment.