mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
fixed websql typings dependency on window
This commit is contained in:
parent
d562b0aba9
commit
1c8027b327
@ -12,6 +12,11 @@ import {DriverOptionNotSetError} from "../error/DriverOptionNotSetError";
|
||||
import {DataTransformationUtils} from "../../util/DataTransformationUtils";
|
||||
import {WebsqlQueryRunner} from "./WebsqlQueryRunner";
|
||||
|
||||
/**
|
||||
* Declare a global function that is only available in browsers that support WebSQL.
|
||||
*/
|
||||
declare function openDatabase(...params: any[]): any;
|
||||
|
||||
/**
|
||||
* Organizes communication with WebSQL in the browser.
|
||||
*/
|
||||
@ -76,7 +81,7 @@ export class WebsqlDriver implements Driver {
|
||||
}, this.options.extra || {});
|
||||
|
||||
return new Promise<void>((ok, fail) => {
|
||||
const connection = (window as any).openDatabase(
|
||||
const connection = openDatabase(
|
||||
options.database,
|
||||
options.version,
|
||||
options.description,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": "2.1.1",
|
||||
"compilerOptions": {
|
||||
"lib": ["es5", "es6", "dom"],
|
||||
"lib": ["es5", "es6"],
|
||||
"outDir": "build/compiled",
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user