title: Using leaflet-easyPrint with Typescript app
body: <p>I have an app created using Typescript and Leaflet and I am trying to add EasyPrint plugin into it (<a href="https://github.com/rowanwins/leaflet-easyPrint" rel="nofollow noreferrer">https://github.com/rowanwins/leaflet-easyPrint</a>); I have a leaflet.aug.d.ts typings file created for extending L.control so that I can add new  plugins to it.</p>
  
  <p>Previously I have added leaflet-measure plugin and had no problems and using the same procedure for easyPrint plugin I get <code>Uncaught TypeError: L.control.easyPrint is not a function</code> error</p>
  
  <p>My Print.ts looks like this:</p>
  
  <pre><code>import * as L from 'leaflet';
  import 'leaflet-easyprint';
  
  export default class Print {
      constructor(map: L.Map){
  
          let print = L.control.easyPrint({
              title: 'Print map',
              position: 'topright'
          }).addTo(map);
      };
  };
  </code></pre>
  
  <p>And my leaflet.aug.d.ts file looks like this :</p>
  
  <pre><code>    import 'leaflet';
  
      declare module 'leaflet' {
          export interface GeoJSONOptions&lt;P = any&gt; {
              name: string;
          }
          export interface WMSOptions&lt;P = any&gt; {
              name: string;
          }
          export interface PolylineOptions&lt;P = any&gt; {
              name: string;
          }
  
          namespace Map {
              export interface MapOptions {
                  measureControl?: boolean;
                  easyPrintControl? : boolean;
              }
          }
  
          export interface ControlStatic {
              Measure: Control.MeasureStatic;
              EasyPrint: Control.EasyPrintStatic;
          }
  
          namespace Control {
  
              export interface MeasureStatic {
                  new (options?: IMeasureConstructorOptions): Measure;
              }
  
              export interface EasyPrintStatic {
                  new (options?: IEasyPrintConstructorOptions): EasyPrint;
  
              }
  
              export interface IMeasureConstructorOptions {
  
                  position?: string;
  
                  parentContainerSelector?: string;
  
                  primaryLengthUnit?: string;
  
                  secondaryLengthUnit?: string;
  
                  secondaryAreaUnit?: string;
  
                  primaryAreaUnit?: string;
  
                  activeColor?: string;
  
                  completedColor?: string;
  
                  popupOptions?: IMeasurePopupOptionsOptions;
  
                  captureZIndex?: number;
  
                  localization? :string;
  
                  decPoint?: string;
  
                  thousandsSep?: string;
  
              }
  
              export interface IEasyPrintConstructorOptions {
                  title: string;
                  position: string;
  
  
  
      }
  
          export interface IMeasurePopupOptionsOptions {
              className? : string;
              autoPanPadding?: Array&lt;number&gt;;
          }
  
          export interface Measure extends L.Control {
  
          }
  
          export interface EasyPrint extends L.Control {
  
          }
  
      }
  
      export namespace control {
              export function measure (options?: Control.IMeasureConstructorOptions): Control.Measure;
              export function easyPrint (options?: Control.IEasyPrintConstructorOptions): Control.EasyPrint;
      }
  }
  </code></pre>
  
  <p>As you can see, for measure plugin no error appeared, but only for easyPrint plugin, although the functions were specified.</p>
  
  <p>My question is : why does the interpretor sees the easyPrint() function on L.control inside my IDE but the browser`s console throws the error ?</p>
  
  <p>Thanks!</p>