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

[pull] next from trpc:next #72

Merged
merged 2 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/server/src/unstable-core-do-not-import/stream/sse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,12 @@ export function sseStreamConsumer<TConfig extends ConsumerConfig>(
});

const onAbort = () => {
controller.close();
eventSource.close();
try {
eventSource.close();
controller.close();
} catch {
// ignore errors in case the controller is already closed
}
};
if (signal.aborted) {
onAbort();
Expand Down
13 changes: 13 additions & 0 deletions www/docs/further/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ Feel free to contribute to this page with improvements or create a new discussio
- Make sure you are using the TypeScript-version required by tRPC (`>=5.7.2`)
- Make sure your editor is using the same TypeScript version as your `package.json`

### VSCode settings

Add these settings to your `.vscode/settings.json` in your project root to make sure your editor is using the same TypeScript version as your `package.json`:

```json title=".vscode/settings.json"
{
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
```

We highly recommend committing this file to your repo so your colleagues also get the same experience.

## How do I make a middleware change the type of my `Context`?

See [Context Extension](/docs/server/middlewares#context-extension).
Expand Down
Loading