Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Document when an API is guaranteed to be synchronous

Đã đóng
#7,771 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ArjunCodess đang làm issue này rồi.

Từ ngày 19/9/2026.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
documentation

Hướng nghiên cứu

Start with the API documentation for Effect.runSync, PubSub.unbounded, Effect.catch, and Scope.addFinalizer, and compare how their synchronous behavior is currently described. Identify the conditions that guarantee synchronous completion and document those guarantees so users can assess whether runSync remains safe across minor updates.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement
What is the problem this feature would solve?

This would allow more confident use of Effect.runSync etc.

For example, if I'm interfacing with some non-effect code and just want a PubSub available synchronously (maybe in a custom HTML element constructor), I've found I can do:

import { Effect, PubSub } from 'effect';
const pubSub = Effect.runSync(PubSub.unbounded());

The question is: can I rely on this to work after a minor version update?

What is the feature you are proposing to solve the problem?

Update the API documentation to state when an Effect produced by the library is guaranteed to run synchronously and under which conditions.

For example,

  • Does PubSub.unbounded() complete synchronously?
  • Does Effect.catch(self, f) complete synchronously if self completes synchronously?
  • Does Scope.addFinalizer(self, finalizer) complete synchronously if self is not closed?

I assume the answer to these is yes, but the API documentation doesn't guarantee that, so I can't be certain that invocations of Effect.runSync won't be broken after a non-breaking effect update.

What alternatives have you considered?

No response

Ngôn ngữ chính
TypeScript
Star
16.7k
Fork
808
Merge trung bình
11 giờ 24 phút
Pull request đã merge (30 ngày)
848

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Effect-TS/effect

Tất cả issue của Effect-TS/effect

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.