/** * Content Script Interfaces */ export interface ContentModule { setup: (args: ContentModuleSetupParams, wasm?: WebAssembly.Instance) => Promise, cleanup?: () => Promise, onThemeChange?: () => void, } export interface ContentModuleSetupParams { [argName: string]: ResourceFileParam | string | undefined } export interface ScriptModule { type: 'script', name: string, path: string, } export interface WasmModuleParam { type: 'wasm', name: string, binaryPath: string, textPath: string, } export interface ResourceFileParam { type: 'resource', name: string, path: string, } export interface StringParam { type: 'string', value: string, } export type TransformResult = ScriptModule | WasmModuleParam | ResourceFileParam | StringParam /** * Resource transformer interfaces */ export interface PostResourceTransformer { extension: string, transform: (value: string) => Promise }