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

(deps): update TypeScript 4.8 #1384

Closed
dai-shi opened this issue Aug 30, 2022 · 4 comments · Fixed by #1395
Closed

(deps): update TypeScript 4.8 #1384

dai-shi opened this issue Aug 30, 2022 · 4 comments · Fixed by #1395

Comments

@dai-shi
Copy link
Member

dai-shi commented Aug 30, 2022

As seen in #1369 (comment), updating TypeScript 4.8 causes type errors.

  • For xstate, we should wait for upstream fix.
  • Fix for jotai/urql should probably be easy.
@dai-shi
Copy link
Member Author

dai-shi commented Aug 31, 2022

Maybe related? statelyai/xstate#3557

@davidkpiano
Copy link

Maybe related? statelyai/xstate#3557

This is now fixed 🚀

@dai-shi
Copy link
Member Author

dai-shi commented Sep 2, 2022

#1395

  • For xstate, we should wait for upstream fix.

Fixed.

  • Fix for jotai/urql should probably be easy.

Unfortunately, there are some errors inside @urql/core, not in our code.

$ tsc --noEmit
node_modules/@urql/core/dist/types/utils/operation.d.ts:2:115 - error TS2344: Type 'Variables' does not satisfy the constraint 'AnyVariables'.
  Type 'Variables' is not assignable to type '{ [prop: string]: any; }'.

2 declare function makeOperation<Data = any, Variables = object>(kind: OperationType, request: GraphQLRequest<Data, Variables>, context: OperationContext): Operation<Data, Variables>;
                                                                                                                    ~~~~~~~~~

  node_modules/@urql/core/dist/types/utils/operation.d.ts:2:44
    2 declare function makeOperation<Data = any, Variables = object>(kind: OperationType, request: GraphQLRequest<Data, Variables>, context: OperationContext): Operation<Data, Variables>;
                                                 ~~~~~~~~~~~~~~~~~~
    This type parameter might need an `extends { [prop: string]: any; }` constraint.
  node_modules/@urql/core/dist/types/utils/operation.d.ts:2:44
    2 declare function makeOperation<Data = any, Variables = object>(kind: OperationType, request: GraphQLRequest<Data, Variables>, context: OperationContext): Operation<Data, Variables>;
                                                 ~~~~~~~~~~~~~~~~~~
    This type parameter might need an `extends AnyVariables` constraint.

cc: @kitten

@JoviDeCroock
Copy link

@dai-shi I will publish a patch

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 a pull request may close this issue.

3 participants