Wojciech Pawlik

Results 118 comments of Wojciech Pawlik

I'm glad you asked! I explained it a few times already, but I think about this a lot, so I have a better understanding each time. TypeScript is trying to...

@equt [`as`](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions) is unsafe. I think I'll `Deunionize` `Context` getters in Telegraf 5 (option 8).

`MatchedContext` is equivalent to `NarrowedContext`, which is roughly equivalent to `Context`. `Context` and `NarrowedContext` are exported, `MountMap` is not. Should I export it in 4.4? Is there a better name...

It's needed for `webhookReply`. I wouldn't mind merging adding another, simpler AWS example, and linking it from README. > ```ts > // The events received from AWS API Gateway are...

See #1082. I mean, I doubt that AWS gives you parsed JSON, you'd have no way to access headers.

In README I think, after cleaning it up.

Done: https://github.com/telegraf/client Currently ESM-only, because `node-fetch@3` is ESM-only (https://github.com/node-fetch/node-fetch/issues/1226), and it's the only `fetch` which supports `FormData` (https://github.com/nodejs/undici/issues/930). @ejnshtein is it ok if I publish it as `@telegraf/client` once it's...

@kamikazechaser should I try switching https://github.com/telegraf/client to https://github.com/nodejs/undici and CJS? Catch: requires Node >=16.5.

To be clear, currently telegraf/client uses `node-fetch@3`, not `http`. It forces it into ESM.

Node.js 16 will be LTS in 1.5 month. Updating to Node 16 is easier and less disruptive than switching JavaScript project to ESM.