Typescript errors

So past few weeks i had been developing and there were 2-3 errors in typescript but those errors never stopped the js bundle from compiling, it always compiled. Today i had to reinstall node, npm and all files. Since then those typescript errors dont let the bundle compile, there’s nothing changed in the package.js or any config file. I wonder what made it stop bundling. And the errors which i ignored were

import {Facebook} from 'ionic-native';
declare const Facebook:any;
login() {
        return new Promise((resolve, reject) => {
            Facebook.login(['email', 'public_profile', 'user_friends'],
                (resp) => {

Error TS2440: Import declaration conflicts with local declaration of ‘Facebook’

if i remove the const, i get Error TS2346: Supplied parameters do not match any signature of call target.

confused on why bundling stopped, is there a way to suppress the errors/warnings?

Since I haven’t used this particular plugin I could be wrong, but since you importing from Ionic-native I don’t think you need the declaration line. That aside I found that if you need the declaration it works better if it is the above all the imports,but again I think removing would fix one of the errors. Second, from what I am aware the native plugin methods are already setup as promises so the new promise line seems unnecessary. Also I would ty writing the fb login call like below. Obviously filling out your particulars

facebook.login(['value', value]).then((resp) => {}, (err) => {}

Also re-read the docs on this plugin.