import { Matcher } from "./data" ; import { AdditionalModules , Context } from "./plugin" ; export type ModuleRuleType = "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" ; export interface ModuleRule { type : ModuleRuleType ; include : string [ ] ; fallthrough ? : boolean ; } export interface ProcessedModuleRule { type : ModuleRuleType ; include : Matcher ; } export const STRING_SCRIPT_PATH = "<script>" ; export interface ScriptBlueprint { readonly filePath : string ; readonly code : string ; } export interface ScriptRunnerResult { exports : Context ; bundleSize ? : number ; watch ? : string [ ] ; } export interface ScriptRunner { run ( globalScope , blueprint , modulesRules ? , additionalModules ? ) : Promise < ScriptRunnerResult > ; }