Skip to content

Eliminate constant expressions from schema export #2831

@benjie

Description

@benjie
const executor = new PgExecutor({
  name: "main",
  context() {
    const ctx = context();
    return object({
      pgSettings: "pgSettings" != null ? ctx.get("pgSettings") : constant(null),
      withPgClient: ctx.get("withPgClient")
    });
  }
});

The expression "pgSettings" != null ? ctx.get("pgSettings") : constant(null) can be replaced with just ctx.get("pgSettings").

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions