Issue 1:
The constructor for an ES6 Set takes an optional iterable parameter (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) but the declaration in lib.d.ts doesn't include it

declare var Set: {
new <T>(): Set<T>;
}

So I'm getting a Typescript error if I try to do something like new Set([1,2,3]).

On a somewhat related note I'm using the 1.5 Beta version of typescript which supports a lot of ES6 features but it still relies on the browser to support Sets. Are there plans polyfill Sets in Typescript?

Issue 2:
Hello, I read #280 & #857 and I'm still confused how can I extend an ambient module. Honestly I'm able to extend it neither nice way nor any other way :-(.

Let's say I have a library I wanna extend. It's not my library, I cannot touch it. It's written in javaScript, so I have .d.ts file for it, e.g.:

AmbientModule.d.ts:

declare module AmbientModule {
export interface SomeInterface {
someField?: string;
}

export function DoSomething(a: SomeInterface): void;
export function DoSomethingElse(): void;
}

I wanna add a new field to the SomeInterface interface. Not just some random field, but field of my type. Here's my extension:

Extension.ts:

/// <reference path="AmbientModule.d.ts"/>
//import am = require("AmbientModule");

import SomeInterface = AmbientModule.SomeInterface;

export module Extension {
export interface ExtData {
someData?: Number;
}

export function MyFunction(): void {
AmbientModule.DoSomethingElse();
var x: SomeInterface = { someField: "sf", additionalFiled: { someData: 7 } };
}
}

declare module AmbientModule {
export interface SomeInterface {
additionalFiled?: Extension.ExtData;
}
}

As you can see I also wanna use the extended interface in the extension itself.

This is the consumer of the extended library:

Consumer.ts:

/// <reference path="AmbientModule.d.ts"/>
//import amb = require("AmbientModule");
import ext = require("Extension");

function main() {
AmbientModule.DoSomething({
someField: "aaa",
additionalFiled: { someData: 7 }
});
}

For completenes, I have _global.ts

_global.ts:

declare module 'AmbientModule' { }

When I try to compile this I get bunch of errors:

TS2322 Type '{ someField: string; additionalFiled: { someData: number; }; }' is not assignable to type 'SomeInterface'.
Object literal may only specify known properties, and 'someField' does not exist in type 'SomeInterface'. Extension.ts 13
TS2345 Argument of type '{ someField: string; additionalFiled: { someData: number; }; }' is not assignable to parameter of type 'SomeInterface'.
Object literal may only specify known properties, and 'additionalFiled' does not exist in type 'SomeInterface'. Consumer.ts 8
Build: Argument of type '{ someField: string; additionalFiled: { someData: number; }; }' is not assignable to parameter of type 'SomeInterface'. Consumer.ts 8
Build: Type '{ someField: string; additionalFiled: { someData: number; }; }' is not assignable to type 'SomeInterface'. Extension.ts 13

So, either I'm doing something wring, or this IMO important scenario is not supported.

If, you ask why am I doing this. I'm trying to extend the jQuery DataTables library with custom column filtering. For that I need to extend the ColumnSettings interface to add my own per-column configuration.