Canvas is not defined

When i try to add filters in the photo using CamanJS in the application it throws canvas is not defined…

<canvas id="demo-image"></canvas>

.ts file code

import 'canvas'
declare let canvas:any;

import {Caman} from 'caman';

Caman('#demo-image','#path to the image',function(){
       alert("Image is Processed");

here the camanjs library CamanJS Library anyhelp thanks

Whatever method i try i get

canvas is not defined

i really need some help here…:frowning: