File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 16
16
stackSave
17
17
*/
18
18
19
+ /**
20
+ * @typedef {{Database:Database} } SqlJs
21
+ * @property {Database } Database the database constructor
22
+ */
23
+
24
+ /**
25
+ * @typedef {{locateFile:function(string):string} } SqlJsConfig
26
+ * @property {function(string):string } locateFile
27
+ * a function that returns the full path to a resource given its file name
28
+ * @see https://emscripten.org/docs/api_reference/module.html
29
+ */
30
+
31
+ /**
32
+ * Asynchronously initializes sql.js
33
+ * @function initSqlJs
34
+ * @param {SqlJsConfig } config module inititialization parameters
35
+ * @returns {SqlJs }
36
+ * @example
37
+ * initSqlJs({
38
+ * locateFile: name => '/path/to/assets/' + name
39
+ * }).then(SQL => {
40
+ * const db = new SQL.Database();
41
+ * const result = db.exec("select 'hello world'");
42
+ * console.log(result);
43
+ * })
44
+ */
19
45
20
46
/**
21
47
* @module SqlJs
You can’t perform that action at this time.
0 commit comments