Skip to content

Embedded resources used as generic actions don't generate types #66

@andr-ec

Description

@andr-ec

Code of Conduct

  • I agree to follow this project's Code of Conduct

AI Policy

  • I agree to follow this project's AI Policy, or I agree that AI was not used while creating this issue.

Versions

latest

Operating system

linux

Current Behavior

When an embedded resource is used as the return type of a generic action (via :struct + instance_of), the type is referenced in the generated RPC file but never defined in the types file.

Reproduction

Reproduction:

  • create an embedded resource that has the AshTypescript extension
  • use it as a generic action return type via constraints instance_of
  • run mix ash_typescript codegen
  • the rpc file imports the type from the types file but it's not in the types file

the workaround is to create a dummy calculation that uses the embedded resource

Expected Behavior

generic action return types should also have generated types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions