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 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
`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 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.

None yet

2 participants