Issue 1:
IDBKeyRange has defined variable only member (except the prototype).

This type can not be declare nor cast.

// Example of other definition.
interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
operator: SVGAnimatedEnumeration; // interface only
radiusX: SVGAnimatedNumber; // interface only
radiusY: SVGAnimatedNumber; // interface only
in1: SVGAnimatedString; // interface only
SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number; // common
SVG_MORPHOLOGY_OPERATOR_ERODE: number; // common
SVG_MORPHOLOGY_OPERATOR_DILATE: number; // common
}
declare var SVGFEMorphologyElement: {
prototype: SVGFEMorphologyElement;
new(): SVGFEMorphologyElement;
SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number; // common
SVG_MORPHOLOGY_OPERATOR_ERODE: number; // common
SVG_MORPHOLOGY_OPERATOR_DILATE: number; // common
}

// IDBKeyRange definition has variable only member.
interface IDBKeyRange {
upper: any; // interface only
upperOpen: boolean; // interface only
lower: any; // interface only
lowerOpen: boolean; // interface only
// After definition is not defined.
// Must be modified to suit the W3C definition.
//bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
//only(value: any): IDBKeyRange;
//lowerBound(bound: any, open?: boolean): IDBKeyRange;
//upperBound(bound: any, open?: boolean): IDBKeyRange;
}
declare var IDBKeyRange: {
prototype: IDBKeyRange;
new(): IDBKeyRange;
bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange; // VARIABLE ONLY!!
only(value: any): IDBKeyRange; // VARIABLE ONLY!!
lowerBound(bound: any, open?: boolean): IDBKeyRange; // VARIABLE ONLY!!
upperBound(bound: any, open?: boolean): IDBKeyRange; // VARIABLE ONLY!!
}

http://www.w3.org/TR/IndexedDB/#range-concept

interface IDBKeyRange {

readonly attribute any lower;

readonly attribute any upper;

readonly attribute boolean lowerOpen;

readonly attribute boolean upperOpen;

static IDBKeyRange only (any value);

static IDBKeyRange lowerBound (any lower, optional boolean open);

static IDBKeyRange upperBound (any upper, optional boolean open);

static IDBKeyRange bound (any lower, any upper, optional boolean lowerOpen, optional boolean upperOpen);

};

Issue 2:
I encountered a few problems while debugging a HTML + Typescript project in visual studio 2013 and 2015 (running ts 1.7 on both). The this context of an arrow function is mapped to the wrong this, the actual this which I expect is stored in a local variable _this which is not visible in TS and should not be visible while debugging.

Reproducing

It is actually visible in the demo app which comes with the HTML application with template project type. In both cases I compile to ecma5, in ecma6 this bug should not even exists because arrow functions are compiled 1 to 1.

I will post the example code below for completeness.

What you will see is if we set a breakpoint on this.span.innerHTML = new Date().toUTCString() and inspect this.span, it will be undefined. This is because the this is wrongly set to the this passed on by setInterval and the actual this of the Greeter instance is stored in a variable named _this.

The weird thing is that if I started a nodejs typescript project, and do the same thing (without the DOM part), everything works as expected. I expect that the IE sourcemapping causes this issue, but I have no idea how to resolve or work around it.

class Greeter {
element: HTMLElement;
span: HTMLElement;
timerToken: number;

constructor(element: HTMLElement) {
this.element = element;
this.element.innerHTML += "The time is: ";
this.span = document.createElement('span');
this.element.appendChild(this.span);
this.span.innerText = new Date().toUTCString();
}

start() {
this.timerToken = setInterval(() => this.span.innerHTML = new Date().toUTCString(), 500);
}

stop() {
clearTimeout(this.timerToken);
}
}
window.onload = () => {
var el = document.getElementById('content');
var greeter = new Greeter(el);
greeter.start();
};

Environments

VS2013
VS2015

Visual studio version
VS2013
VS2015

Typescript Version
1.7.5
1.7

IE version
11.20.x
11.20.x

NTVS version
1.1
1.1