Type Alias Config<param>

Config<param>: {
    escape_prefix: param["JavaScriptIdentifier"] & string;
    global_object_variable: param["JavaScriptIdentifier"] & string;
    intrinsic_global_variable: param["JavaScriptIdentifier"] & string;
    mode: "normal" | "standalone";
}

Configuration object for retropile.

Type Parameters

  • param extends {
        JavaScriptIdentifier?: string;
    } = {}

Type declaration

  • escape_prefix: param["JavaScriptIdentifier"] & string

    Internal variables are prefixed with this string to avoid clashing with external variables. Must be a valid JavaScript identifier.

    "_aran_"

  • global_object_variable: param["JavaScriptIdentifier"] & string

    The global variable that refer to the global object. Change this value only if globalThis do not refer to the global object for some reason. Must be a valid JavaScript identifier.

    "globalThis"

  • intrinsic_global_variable: param["JavaScriptIdentifier"] & string

    The global variable that refers to the intrinsic object defined by the setup code. Make sure it does not clash with other global variables. Can be any arbitrary string.

    "_ARAN_INTRINSIC_"

  • mode: "normal" | "standalone"

    Indicates whether or not the setup code should be bundle with the instrumented code. The setup code is generated by setupile and simply defines a global variable that holds all the intrinsic values used by Aran.

    • "normal": Do not bundle the setup code with the instrumented code. Setup code is expected to have been executed once before any instrumented code. This is the mode you should use for real-world use cases.
    • "standalone": Bundle the setup code with the instrumented code. It does no longer require prior execution of the setup code but multiple instrumented code will interact well. This is the mode you should use to investigate and share standalone instrumented snippets.

    "normal"