Skip to content

Commit 7e175dc

Browse files
dbrattliclaude
andauthored
refactor(python): split FSharpRef.__init__ into overloads (#4638)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3c7d98d commit 7e175dc

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • src/fable-library-py/fable_library/core

src/fable-library-py/fable_library/core/types.pyi

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
from collections.abc import Callable
2+
from typing import overload
23

34
class FSharpRef[T]:
4-
def __init__(self, contents_or_getter: T | Callable[[], T], setter: Callable[[T], None] | None = None) -> None: ...
5+
@overload
6+
def __init__(self, contents_or_getter: T) -> None: ...
7+
@overload
8+
def __init__(self, contents_or_getter: Callable[[], T], setter: Callable[[T], None]) -> None: ...
59
@property
610
def contents(self) -> T: ...
711
@contents.setter

0 commit comments

Comments
 (0)