Skip to content

Commit

Permalink
try importing everything from extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
adhami3310 committed Nov 13, 2024
1 parent 7aa9245 commit 48951db
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions reflex/vars/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,22 @@

import dataclasses
import sys
from typing import Any, Generic, Optional, Sequence, Tuple, Type, Union, overload

from typing_extensions import Callable, Concatenate, ParamSpec, Protocol, TypeVar
from typing_extensions import (
Any,
Callable,
Concatenate,
Generic,
Optional,
ParamSpec,
Protocol,
Sequence,
Tuple,
Type,
TypeVar,
Union,
overload,
)

from reflex.utils import format
from reflex.utils.types import GenericType
Expand Down Expand Up @@ -458,7 +471,10 @@ def create(
JSON_STRINGIFY = FunctionStringVar.create(
"JSON.stringify", _var_type=ReflexCallable[[Any], str]
)
ARRAY_ISARRAY = FunctionStringVar.create("Array.isArray")
ARRAY_ISARRAY = FunctionStringVar.create(
"Array.isArray", _var_type=ReflexCallable[[Any], bool]
)
PROTOTYPE_TO_STRING = FunctionStringVar.create(
"((__to_string) => __to_string.toString())"
"((__to_string) => __to_string.toString())",
_var_type=ReflexCallable[[Any], str],
)

0 comments on commit 48951db

Please sign in to comment.