|
33 | 33 | _STRING_WEB_MODULE_CACHE: dict[str, WebModule] = {} |
34 | 34 |
|
35 | 35 |
|
| 36 | +@overload |
| 37 | +def reactjs_component_from_url( |
| 38 | + url: str, |
| 39 | + import_names: str, |
| 40 | + fallback: Any | None = ..., |
| 41 | + resolve_imports: bool | None = ..., |
| 42 | + resolve_imports_depth: int = ..., |
| 43 | + unmount_before_update: bool = ..., |
| 44 | + allow_children: bool = ..., |
| 45 | +) -> VdomConstructor: ... |
| 46 | + |
| 47 | + |
| 48 | +@overload |
| 49 | +def reactjs_component_from_url( |
| 50 | + url: str, |
| 51 | + import_names: list[str] | tuple[str, ...], |
| 52 | + fallback: Any | None = ..., |
| 53 | + resolve_imports: bool | None = ..., |
| 54 | + resolve_imports_depth: int = ..., |
| 55 | + unmount_before_update: bool = ..., |
| 56 | + allow_children: bool = ..., |
| 57 | +) -> list[VdomConstructor]: ... |
| 58 | + |
| 59 | + |
36 | 60 | def reactjs_component_from_url( |
37 | 61 | url: str, |
38 | 62 | import_names: str | list[str] | tuple[str, ...], |
@@ -80,6 +104,34 @@ def reactjs_component_from_url( |
80 | 104 | return _vdom_from_web_module(module, import_names, fallback, allow_children) |
81 | 105 |
|
82 | 106 |
|
| 107 | +@overload |
| 108 | +def reactjs_component_from_file( |
| 109 | + name: str, |
| 110 | + file: str | Path, |
| 111 | + import_names: str, |
| 112 | + fallback: Any | None = ..., |
| 113 | + resolve_imports: bool | None = ..., |
| 114 | + resolve_imports_depth: int = ..., |
| 115 | + unmount_before_update: bool = ..., |
| 116 | + symlink: bool = ..., |
| 117 | + allow_children: bool = ..., |
| 118 | +) -> VdomConstructor: ... |
| 119 | + |
| 120 | + |
| 121 | +@overload |
| 122 | +def reactjs_component_from_file( |
| 123 | + name: str, |
| 124 | + file: str | Path, |
| 125 | + import_names: list[str] | tuple[str, ...], |
| 126 | + fallback: Any | None = ..., |
| 127 | + resolve_imports: bool | None = ..., |
| 128 | + resolve_imports_depth: int = ..., |
| 129 | + unmount_before_update: bool = ..., |
| 130 | + symlink: bool = ..., |
| 131 | + allow_children: bool = ..., |
| 132 | +) -> list[VdomConstructor]: ... |
| 133 | + |
| 134 | + |
83 | 135 | def reactjs_component_from_file( |
84 | 136 | name: str, |
85 | 137 | file: str | Path, |
@@ -135,6 +187,32 @@ def reactjs_component_from_file( |
135 | 187 | return _vdom_from_web_module(module, import_names, fallback, allow_children) |
136 | 188 |
|
137 | 189 |
|
| 190 | +@overload |
| 191 | +def reactjs_component_from_string( |
| 192 | + name: str, |
| 193 | + content: str, |
| 194 | + import_names: str, |
| 195 | + fallback: Any | None = ..., |
| 196 | + resolve_imports: bool | None = ..., |
| 197 | + resolve_imports_depth: int = ..., |
| 198 | + unmount_before_update: bool = ..., |
| 199 | + allow_children: bool = ..., |
| 200 | +) -> VdomConstructor: ... |
| 201 | + |
| 202 | + |
| 203 | +@overload |
| 204 | +def reactjs_component_from_string( |
| 205 | + name: str, |
| 206 | + content: str, |
| 207 | + import_names: list[str] | tuple[str, ...], |
| 208 | + fallback: Any | None = ..., |
| 209 | + resolve_imports: bool | None = ..., |
| 210 | + resolve_imports_depth: int = ..., |
| 211 | + unmount_before_update: bool = ..., |
| 212 | + allow_children: bool = ..., |
| 213 | +) -> list[VdomConstructor]: ... |
| 214 | + |
| 215 | + |
138 | 216 | def reactjs_component_from_string( |
139 | 217 | name: str, |
140 | 218 | content: str, |
|
0 commit comments