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

Add isInstance for each Kubernetes resource type #582

Merged
merged 3 commits into from
Jun 4, 2019

Conversation

hausdorff
Copy link
Contributor

Resource.isInstance is a static method that provides a type guard
allowing users to check whether an arbitrary object is a Resource.

This commit implements this function for all Kubernetes implementations
of Resource. So, e.g., Pod.isInstance(foo) is a type guard for
Pod.

@hausdorff hausdorff requested review from lblackstone and ellismg June 4, 2019 00:53
@hausdorff hausdorff force-pushed the hausdorff/instanceOf branch 5 times, most recently from 4b79f01 to 0d22ba9 Compare June 4, 2019 02:50
tests/integration/query/step1/index.ts Outdated Show resolved Hide resolved
@hausdorff hausdorff force-pushed the hausdorff/instanceOf branch from 0d22ba9 to f2adc29 Compare June 4, 2019 20:57
hausdorff added 3 commits June 4, 2019 14:52
`Resource.isInstance` is a static method that provides a type guard
allowing users to check whether an arbitrary object is a `Resource`.

This commit implements this function for all Kubernetes implementations
of `Resource`. So, e.g., `Pod.isInstance(foo)` is a type guard for
`Pod`.
@hausdorff hausdorff force-pushed the hausdorff/instanceOf branch from f2adc29 to ee25c12 Compare June 4, 2019 21:52
@hausdorff hausdorff merged commit 8994190 into master Jun 4, 2019
@pulumi-bot pulumi-bot deleted the hausdorff/instanceOf branch June 4, 2019 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants