import { AudioSettings, VariableNamesIndex } from '../compile/types'; import { Bindings, EngineMetadata } from './types'; export declare const getFloatArrayType: (bitDepth: AudioSettings['bitDepth']) => Float32ArrayConstructor | Float64ArrayConstructor; export declare const proxyAsModuleWithBindings: (rawModule: { [key: string]: any; }, bindings: Bindings) => ModuleType; /** * Reverse-maps exported variable names from `rawModule` according to the mapping defined * in `variableNamesIndex`. * * For example with : * * ``` * const variableNamesIndex = { * globals: { * // ... * fs: { * // ... * readFile: 'g_fs_readFile' * }, * } * } * ``` * * The function `g_fs_readFile` (if it is exported properly by the raw module), will then * be available on the returned object at path `.globals.fs.readFile`. */ export declare const proxyWithEngineNameMapping: (rawModule: object, variableNamesIndex: VariableNamesIndex | EngineMetadata['compilation']['variableNamesIndex']) => any; export declare const proxyWithNameMapping: (rawModule: object, variableNamesIndex: NameMapping) => any; type NameMappingObject = { [key: string]: string | NameMapping; }; type NameMapping = NameMappingObject | string | undefined; export {};