Skip to content

Verify no arguments are given to reactive and render decorators #1819

Open
@schloerke

Description

@schloerke
  • Near

    # The CalcAsync subclass will pass in an async function, but it tells the
    # static type checker that it's synchronous. wrap_async() is smart -- if is
    # passed an async function, it will not change it.
    self._fn: CalcFunctionAsync[T] = _utils.wrap_async(fn)
    , we should inspect the fn to verify that it has not arguments. (O(1) when running the app)

  • Near

    # Set value function with extra meta information
    self.fn = AsyncValueFn(_fn)
    , we should inspect the fn to verify that it has no arguments. (O(1) when running the app)

Motivation: Provide clear errors to users who do not enable type checking of their common mistake.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions