What's the difference between:
import * as jslibname from 'jslibname'
declare var jslibname: any;
declare var firebase: any;
import * as moment from 'moment';
When you do
import * as library from 'library';
you are really importing the library and you can start using it. If you try to use it without importing before you would gen en error. Sometimes the library is being imported already in some place in your app but you just have to use it. You can and the app will work but I guess that in your case the TS compiler throws an error (and probably your IDE marks it as an error). This is because there is no typing definition file for your library (.d.ts). The easiest way to fix it is to do
declare var library: any;
This is telling the TS compiler that library exists and stops throwing an compilation error (also IDE stops complaining).