checkly/checkly-cli

bug: locations is required on interface CheckGroupProps

Closed this issue · 2 comments

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.

thanks @slmoore for reporting this.

@slmoore this was just fixed in v4.8.1 which was just published on NPM
https://www.npmjs.com/package/checkly