How to integrate Typed.js with Angular 2?

You need to change your import to import * as Typed from 'typed.js';


Install typed.js package in your project

npm install typed.js --save

Import typed.js in your component.ts file

import Typed from 'typed.js';

Add this code in ngOnInit() of component.ts

const options = {
     strings: ['Innovation.', 'Discovery.'],
     typeSpeed: 100,
     backSpeed: 100,
     showCursor: true,
     cursorChar: '|',
     loop: true
};

const typed = new Typed('.typed-element', options);

Create html element to render output of typed.js

<span class="typed-element">Fsfsfsfsfs</span>  

Please refer to https://github.com/vishalhulawale/angular/tree/master/integrations/typedJS