Skip to content

Commit

Permalink
Fix Type Error on swal
Browse files Browse the repository at this point in the history
Fixes #890

```
ERROR in node_modules/sweetalert/typings/sweetalert.d.ts(4,9): error TS2403: Subsequent variable declarations must have the same type.  Variable 'swal' must be of type 'typeof import("C:/proj/node_modules/sweetalert/typings/sweetalert")', but here has type 'SweetAlert'.
```
  • Loading branch information
doggy8088 committed Mar 7, 2019
1 parent 7dc94fd commit f43b073
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions src/sweetalert.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import swal, { SweetAlert } from "./core";

declare global {
const swal: SweetAlert;
const sweetAlert: SweetAlert;
}
import swal from "./core";

export default swal;
export as namespace swal;
7 changes: 1 addition & 6 deletions typings/sweetalert.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import swal, { SweetAlert } from "./core";

declare global {
const swal: SweetAlert;
const sweetAlert: SweetAlert;
}
import swal from "./core";

export default swal;
export as namespace swal;

0 comments on commit f43b073

Please sign in to comment.