So there’s a few issues here.
npm install @types/wampy --save
This is the new typescript 2.0 way of handling 3rd party typings. TS 2.0 is still in beta and not officially released. So this will not work at the moment.
The correct way to do what you want to do is
typings install dt~wampy --global --save
This is how our setup works.
Then to use the module, you can do the following
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
// Import everything from 'wampy', and store
// it under a local variable of wampy
import * as wampy from 'wampy';
export class Page1 {
// create a new property call ws, which is a new instance of our wampy import
public ws = new wampy('/ws/', { realm: 'AppRealm' });
constructor()}
this.ws.subscribe('system.monitor.update', (data)=> { console.log('Received system.monitor.update event!'); })
.subscribe('client.message', (data)=> { c
}
}