title: How do I extend a TypeScript class definition in a separate definition file?
body: <p>I have a JS library called leaflet which has an existing TypeScript definition file.</p>
  
  <p>I wish to use a plugin which extends some of the objects in leaflet with an extra function.</p>
  
  <p>In the existing TypeScript definition file the objects are defined as classes rather than interfaces.</p>
  
  <p>e.g.</p>
  
  <pre><code>declare module L {
      function circleMarker(latlng: LatLng, options?: PathOptions): CircleMarker;
  
      export class CircleMarker extends Circle {
          constructor(latlng: LatLng, options?: PathOptions);
          setLatLng(latlng: LatLng): CircleMarker;
          setRadius(radius: number): CircleMarker;
          toGeoJSON(): any;
      }
  }
  </code></pre>
  
  <p>If I try and define it a second time in a separate file then I get an error about "Duplicate Identifier 'CircleMarker'.".</p>
  
  <pre><code>declare module L {
      export class CircleMarker {
          bindLabel(name: string, options: any): CircleMarker;
      }
  }
  </code></pre>
  
  <p>This makes sense as it's a class and not an interface, but that being the case is there a way to extend this class definition without changing the original definition file?</p>
  
  <p>The base definition file is pulled in from DefinitelyTyped via nuget so I have a very strong desire not to make any changes to it as it'll make updating much more awkward/prone to failure.</p>