0

I am referencing Howler in my index.html file:

<script src="https://cdnjs.cloudflare.com/ajax/libs/howler/2.0.3/howler.min.js"></script>

Then in my app.component.ts I have the line:

let sound = new Howl({src: [sample]});

This produces the error:

error TS2304: Cannot find name 'Howl'.

I tried including it in the lib array in tsconfig.json but that is not permitted.

LoïcR
  • 4,940
  • 1
  • 34
  • 50
GluePear
  • 7,244
  • 20
  • 67
  • 120

1 Answers1

0

Try DefinitelyTyped typings definition for howler.

Here is the repo on GitHub where you can find howler.d.ts

Here is the npm package info

TypeScript v2 use following command to install

npm install --save @types/howler

If you have any question, post in their Gitter chat

Tinus Jackson
  • 3,397
  • 2
  • 25
  • 58