Skip to content

--instantiation help suggests default async, but -I without value errors #1254

@ritalin

Description

@ritalin

I have a question about the expected behavior of jco transpile --instantiation.

The help shows:

-I, --instantiation [mode]
output for custom module instantiation (choices: "async", "sync", preset: "async")

From this, I expected the behavior to be:

  • -I async => generate instantiate function (async)
  • -I sync => generate instantiate function (sync)
  • -I => generate instantiate function (async)
  • (no -I) => ESM output

However, in practice -I without a value results in an error because the next argument is treated as the mode:

$ jco transpile ... -I foo.wasm
error: option '-I, --instantiation [mode]' argument 'foo.wasm' is invalid. Allowed choices are async, sync.

Is this the expected behavior?

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