'How to use CDN-JS library in TS-script on jsfiddle.net platform?
For example, I have sfiddle-example-js script like this and it works:
const { parallelLimit } = async
new Promise(async () => {
const tasks = Array(10)
.fill(null)
.map((item, i) => async () => i)
const limit = 5
await parallelLimit(tasks, limit)
.then((results) => console.log(results.join(',')))
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/async/3.2.3/async.js"></script>
But when I switch it to TypeScript, this script doesn't work.
Now I have to do something like this,
npm i --save-dev @types/async
but how do I do it in the https://jsfiddle.net platform?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
