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

bug: locations is required on interface CheckGroupProps #939

Open
slmoore opened this issue Feb 23, 2024 · 1 comment
Open

bug: locations is required on interface CheckGroupProps #939

slmoore opened this issue Feb 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@slmoore
Copy link

slmoore commented Feb 23, 2024

Node.js version

16.17.0

NPM version

8.15.0

@checkly/cli version

4.6.1

Steps to reproduce

When creating a new CheckGroup(), if the CheckGroupProps argument is using privateLocations and omits locations there is a TypeScript Error:

Property 'locations' is missing in type '{ alertChannels: AlertChannelWrapper[]; name: string; activated: true; muted: false; concurrency: number; frequency: Frequency; tags: string[]; privateLocations: string[]; browserChecks: { ...; }; retryStrategy: RetryStrategy; }' but required in type 'CheckGroupProps'.ts(2345)

Is it ok for locations to be an Optional parameter in the interface CheckGroupProps?

locations: Array<keyof Region>

This would match with interface CheckProps which is used by ApiCheck and BrowserCheck.

locations?: Array<keyof Region>

Thanks!

What is expected?

No TypeScript error

What is actually happening?

TypeScript Error

Any additional comments?

For context, we're running one Group of checks using privateLocations and a separate Group of checks using locations.

@slmoore slmoore added the bug Something isn't working label Feb 23, 2024
@tnolet
Copy link
Member

tnolet commented Feb 28, 2024

thanks @slmoore for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants