@@ -238,7 +238,7 @@ def add_hooks(self) -> list[Var | str]:
238238
239239 @staticmethod
240240 def send_toast (
241- message : str | Var = "" ,
241+ message : str | Var [ str ] = "" ,
242242 level : str | None = None ,
243243 fallback_to_alert : bool = False ,
244244 ** props ,
@@ -292,7 +292,7 @@ def send_toast(
292292 return run_script (toast )
293293
294294 @staticmethod
295- def toast_info (message : str | Var = "" , ** kwargs : Any ):
295+ def toast_info (message : str | Var [ str ] = "" , ** kwargs : Any ) -> EventSpec :
296296 """Display an info toast message.
297297
298298 Args:
@@ -305,7 +305,7 @@ def toast_info(message: str | Var = "", **kwargs: Any):
305305 return Toaster .send_toast (message , level = "info" , ** kwargs )
306306
307307 @staticmethod
308- def toast_warning (message : str | Var = "" , ** kwargs : Any ):
308+ def toast_warning (message : str | Var [ str ] = "" , ** kwargs : Any ) -> EventSpec :
309309 """Display a warning toast message.
310310
311311 Args:
@@ -318,7 +318,7 @@ def toast_warning(message: str | Var = "", **kwargs: Any):
318318 return Toaster .send_toast (message , level = "warning" , ** kwargs )
319319
320320 @staticmethod
321- def toast_error (message : str | Var = "" , ** kwargs : Any ):
321+ def toast_error (message : str | Var [ str ] = "" , ** kwargs : Any ) -> EventSpec :
322322 """Display an error toast message.
323323
324324 Args:
@@ -331,7 +331,7 @@ def toast_error(message: str | Var = "", **kwargs: Any):
331331 return Toaster .send_toast (message , level = "error" , ** kwargs )
332332
333333 @staticmethod
334- def toast_success (message : str | Var = "" , ** kwargs : Any ):
334+ def toast_success (message : str | Var [ str ] = "" , ** kwargs : Any ) -> EventSpec :
335335 """Display a success toast message.
336336
337337 Args:
@@ -344,7 +344,7 @@ def toast_success(message: str | Var = "", **kwargs: Any):
344344 return Toaster .send_toast (message , level = "success" , ** kwargs )
345345
346346 @staticmethod
347- def toast_loading (message : str | Var = "" , ** kwargs : Any ):
347+ def toast_loading (message : str | Var [ str ] = "" , ** kwargs : Any ) -> EventSpec :
348348 """Display a loading toast message.
349349
350350 Args:
@@ -357,7 +357,7 @@ def toast_loading(message: str | Var = "", **kwargs: Any):
357357 return Toaster .send_toast (message , level = "loading" , ** kwargs )
358358
359359 @staticmethod
360- def toast_dismiss (id : Var | str | None = None ):
360+ def toast_dismiss (id : Var [ str ] | str | None = None ) -> EventSpec :
361361 """Dismiss a toast.
362362
363363 Args:
0 commit comments