Skip to content

Conversation

@wujessica
Copy link

No description provided.

@robertkozin robertkozin marked this pull request as ready for review August 11, 2022 20:06
@wujessica wujessica merged commit 12fde82 into master Aug 11, 2022
VojtechVitek added a commit to webrpc/gen-typescript that referenced this pull request Jul 19, 2023
Credits:
- @kipply
- @udameli
- @wujessica
- @1vn
- @robertkozin

cohere-ai/webrpc#1
cohere-ai/webrpc#3
cohere-ai/webrpc#20

---

AbortSignal docs:

https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal

---

Example:

  const controller = new AbortController();
  const signal = controller.signal;

  setTimeout(() => controller.abort(), 5000);

  const { user } = await rpc.GetUser({ userId }, null, signal);
VojtechVitek added a commit to webrpc/gen-typescript that referenced this pull request Jul 19, 2023
* Backport AbortSignal feature from cohere.ai fork

Credits:
- @kipply
- @udameli
- @wujessica
- @1vn
- @robertkozin

cohere-ai/webrpc#1
cohere-ai/webrpc#3
cohere-ai/webrpc#20

---

AbortSignal docs:

https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal

---

Example:

  const controller = new AbortController();
  const signal = controller.signal;

  setTimeout(() => controller.abort(), 5000);

  const { user } = await rpc.GetUser({ userId }, null, signal);

* AbortSignal is already in Fetch's RequestInit argument

* Fix TypeScript error TS2304: Cannot find name 'AbortSignal'

  server.gen.ts:41:57 - error TS2304: Cannot find name 'AbortSignal'

Add "DOM" to compilerOptions.lib in your tsconfig.json file.
@maxbrunet maxbrunet deleted the jw/fix-create-http-req branch April 3, 2025 17:52
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