[ENG-3817] deprecate _var_name_unwrapped (instead of removing it) (#3951)

some components and code examples used `_var_name_unwrapped`, so map this
property back to `_js_expr` and deprecate it.
This commit is contained in:
Masen Furer 2024-09-18 21:33:50 -07:00 committed by GitHub
parent c46d1d9c7e
commit 5f296eec38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -119,6 +119,16 @@ class Var(Generic[VAR_TYPE]):
"""
return self._js_expr
@property
@deprecated("Use `_js_expr` instead.")
def _var_name_unwrapped(self) -> str:
"""The name of the var without extra curly braces.
Returns:
The name of the var.
"""
return self._js_expr
@property
def _var_is_string(self) -> bool:
"""Whether the var is a string literal.