UNPKG

aran

Version:
41 lines (40 loc) 1.82 kB
/** * Configuration object for `retropile`. */ export type Config<param extends { JavaScriptIdentifier?: string } = {}> = { /** * 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. * @defaultValue `"normal"` */ mode: "normal" | "standalone"; /** * 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. * @defaultValue `"globalThis"` */ global_object_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. * @defaultValue `"_ARAN_INTRINSIC_"` */ intrinsic_global_variable: param["JavaScriptIdentifier"] & string; /** * Internal variables are prefixed with this string to avoid clashing with * external variables. Must be a valid JavaScript identifier. * @defaultValue `"_aran_"` */ escape_prefix: param["JavaScriptIdentifier"] & string; };