Skip to content

agent.stub types break when callable returns this.state #598

@mattzcarey

Description

@mattzcarey

Describe the bug

In a Agent define this method

  @callable()
  async getInternal() {
    return this.state;
  }

then in a client using useAgent try and call this:

const state = await agent.stub.getInternal();

getInternal() throws a typescript error.

if you change getInternal() to

  @callable()
  async getInternal() {
    return "hello world";
  }

it works fine.

Version:
latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions