Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ptpaterson
Copy link
Contributor

#625 did not add types for the Client class.

@doom-weaver doom-weaver dismissed their stale review March 29, 2022 17:30

made better

@ptpaterson ptpaterson merged commit 270b8d0 into v4 Mar 29, 2022
@ptpaterson ptpaterson deleted the typesForQueryWithStats branch March 29, 2022 17:36
export default class Client {
constructor(opts?: ClientConfig)
query<T = object>(expr: ExprArg, options?: QueryOptions): Promise<T>
query<T = object>(expr: ExprArg, options?: QueryOptions): Promise<T> | Promise<MetricsResponse<T>>
Copy link

@Akryum Akryum Mar 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change for TypeScript projects :(

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example:

image

error TS2322: Type 'boolean | MetricsResponse<boolean>' is not assignable to type 'boolean'.

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.

3 participants