@iktos/rdkitjs
Version:
RDKit-js implementation based on RDKit's original c++ source and emscripten
22 lines (21 loc) • 896 B
TypeScript
import { ModuleObject, RdkitInstance, RdkitModule } from '../types';
/**
* @private
* @returns {RdkitInstance}
* @throws rdkit.js is not initialised.
*/
export declare const getInstance: () => RdkitInstance;
/**
* @returns {boolean} if the rdkit module is initialised
*/
export declare function isInitialised(): boolean;
/**
* Initialises the WebAssembly backend.
* Needs to be called and finished before any other methods or classes can be used.
* If no fileLocation is provided it assumes that the rdkit.wasm file is in the same directory as the rdkitjs.(cjs|esm).js file
*
* @async
* @param {Function} rdkitModule module to use to initialise wasm (full or mini)
* @param {string} fileLocation either the wasm path
*/
export declare function initialise(rdkitModule: (moduleObject: ModuleObject) => Promise<RdkitModule>, fileLocation?: string): Promise<void>;