A driver for MakeCode.

This stores state to correlate requests/responses to and from MakeCode.

Constructors

Methods

  • Create a URL that can be used to import a project into MakeCode.

    This can be useful if MakeCode is embedded in one application but you want to be able to export to non-embedded MakeCode.

    The applications must be part of the same site as the process relies on shared client-side storage.

    The URL must be used immediately as it won't remain valid if another call is made.

    Parameters

    Returns Promise<{ importUrl: string }>

  • Import a tutorial from markdown text.

    See also startActivity.

    Parameters

    • options: { markdown: string }

    Returns Promise<void>

  • Parameters

    • options: { enabled: boolean; intervalSpeed?: number }

    Returns Promise<void>

  • Stops the simulator.

    Parameters

    • Optionaloptions: { unload: boolean }
      • unload: boolean

        Optionally unload the simulator (removes its UI)

    Returns Promise<void>