Skip to content

Conversation

@Cherry
Copy link
Contributor

@Cherry Cherry commented Nov 6, 2024

  • Enables type-checking on a few more files, and improves types in some of them as needed.
  • Both @types/hast and mdast-util-mdx-expression are added as dev dependencies, but are actually already present due to transitive requirements, so no real new deps.
  • Enables type-checking of the worker, like the functions, in CI
Note: There's a weird type mismatch between the `Fetcher` that `this.env.ASSETS` is and what the `generateRedirectsEvaluator` function expects:
Argument of type '{ fetch(input: RequestInfo<unknown, CfProperties<unknown>>, init?: RequestInit<CfProperties<unknown>> | undefined): Promise<Response>; connect(address: string | SocketAddress, options?: SocketOptions | undefined): Socket; }' is not assignable to parameter of type '{ fetch(input: RequestInfo<unknown, CfProperties<unknown>>, init?: RequestInit<CfProperties<unknown>> | undefined): Promise<Response>; connect(address: string | SocketAddress, options?: SocketOptions | undefined): Socket; queue(queueName: string, messages: ServiceBindingQueueMessage<...>[]): Promise<...>; scheduled(...'.
  Type '{ fetch(input: RequestInfo<unknown, CfProperties<unknown>>, init?: RequestInit<CfProperties<unknown>> | undefined): Promise<Response>; connect(address: string | SocketAddress, options?: SocketOptions | undefined): Socket; }' is missing the following properties from type '{ fetch(input: RequestInfo<unknown, CfProperties<unknown>>, init?: RequestInit<CfProperties<unknown>> | undefined): Promise<Response>; connect(address: string | SocketAddress, options?: SocketOptions | undefined): Socket; queue(queueName: string, messages: ServiceBindingQueueMessage<...>[]): Promise<...>; scheduled(...': queue, scheduled

But some type-checking is better than no type-checking.

cc @KianNH @GregBrimble

@KianNH KianNH merged commit 73f409d into cloudflare:production Nov 12, 2024
5 checks passed
@workers-devprod workers-devprod added the contribution [Holopin] Recognizes a docs contribution, big or small label Nov 12, 2024
@holopin-bot
Copy link

holopin-bot bot commented Nov 12, 2024

Congratulations @Cherry, the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cm3eeqgyi21480ciax0tonp8g

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

harshil1712 pushed a commit that referenced this pull request Dec 3, 2024
* fix: various typescript improvements

* fix: mdxTextExpression comparison
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution [Holopin] Recognizes a docs contribution, big or small size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants