Skip to content

Unclear error when repeating entity names in operation arguments #3272

@cprecioso

Description

@cprecioso

From https://discord.com/channels/686873244791210014/867713251479519232/1430464848529199174

In main.wasp, code like

action myAction {
  fn: import { myAction } from "@src/server/operations/myAction",
  entities: [Entity1, Entity2, Entity1] // note the repeated entity
}

Will not error out immediately, but give this error later:

server/operations/actions/index.ts(77,7): error TS1117: An object literal cannot have multiple properties with the same name.

We should either allow it or prompt a clearer error sooner.

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