[TypeScript] Swal namespace isn't recognized when importing from 'sweetalert2/src/sweetalert2.js'
See original GitHub issueSteps to reproduce
- clone https://github.com/sweetalert2/sweetalert2-parcel-demo
- open
app.ts
Current behavior
Expected behavior
The same as when importing Swal 'sweetalert2'
:
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
javascript - Using SweetAlert2 with TypeScript, could not find a ...
Try removing the declare module block entirely in your copied file. Then, use declare namespace Swal , and it'll work. We should be...
Read more >Types aren't recognized until I open them in another tab - GitHub
[TypeScript] Swal namespace isn't recognized when importing from 'sweetalert2/src/sweetalert2.js' sweetalert2/sweetalert2#2056.
Read more >sweetalert - npm
A beautiful replacement for JavaScript's "alert". Latest version: 2.1.2, last published: 4 years ago. Start using sweetalert in your project ...
Read more >Docs - SweetAlert
The modal's text. It can either be added as a configuration under the key text (as in the example below), or passed as...
Read more >SweetAlert2 - a beautiful, responsive, customizable and ...
A beautiful, responsive, customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mlbonniec please create another issue with the simple repo to reproduce the issue.
Hi, I’ve the same issue. I want as well, import SweetAlert JS without CSS.
I red your issue on VSCode repository https://github.com/microsoft/vscode/issues/107061, but it didn’t resolve mine. 😕
https://user-images.githubusercontent.com/29955402/114052670-8808fb00-988e-11eb-92c9-3ee1ee58ec77.mov
Yet, I’ve a
tsconfig.json
like thisDo you know how to fix?
Here are my VSCode and others, versions.