Issue 1:
TypeScript version: 1.5.3+

I'm using the aurelia libraries and when I put the following decorators on properties the emitted javascript is not in the right format.

import {autoinject, bindable} from "aurelia-framework";
import {Configuration} from "../../../../config/config-loader";

@autoinject
export class FreedrawCustomElement {
@bindable
allowCreate: boolean = true;

@bindable
allowEdit: boolean = false;

@bindable
onSimulate: () => void;

@bindable
onEdit: Function;

constructor(private config: Configuration) {
}

simulateArea() {
if (this.onSimulate && this.allowCreate) {
this.onSimulate();
}
}

editArea() {
if (this.onEdit && this.allowEdit) {
this.onEdit();
}
}
}

The emitted JS is

var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);
case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);
}
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var aurelia_framework_1 = require("aurelia-framework");
var config_loader_1 = require("../../../../config/config-loader");
var FreedrawCustomElement = (function () {
function FreedrawCustomElement(config) {
this.config = config;
this.allowCreate = true;
this.allowEdit = false;
}
FreedrawCustomElement.prototype.simulateArea = function () {
if (this.onSimulate && this.allowCreate) {
this.onSimulate();
}
};
FreedrawCustomElement.prototype.editArea = function () {
if (this.onEdit && this.allowEdit) {
this.onEdit();
}
};
__decorate([
aurelia_framework_1.bindable,
__metadata('design:type', Boolean)
], FreedrawCustomElement.prototype, "allowCreate");
__decorate([
aurelia_framework_1.bindable,
__metadata('design:type', Boolean)
], FreedrawCustomElement.prototype, "allowEdit");
__decorate([
aurelia_framework_1.bindable,
__metadata('design:type', Function)
], FreedrawCustomElement.prototype, "onSimulate");
__decorate([
aurelia_framework_1.bindable,
__metadata('design:type', )
], FreedrawCustomElement.prototype, "onEdit");
FreedrawCustomElement = __decorate([
aurelia_framework_1.autoinject,
__metadata('design:paramtypes', [config_loader_1.Configuration])
], FreedrawCustomElement);
return FreedrawCustomElement;
})();
exports.FreedrawCustomElement = FreedrawCustomElement;
//# sourceMappingURL=freedraw.js.map

If you check in the the decorator emitted for the onEdit property it haven't the value defined for the second parameter: __metadata('design:type', ). The previous decorator, on the onSimulate was emitted because it was defined as a closure type, but not the second, which was defined as a Function type.

The same error occurs with HTML*, e.g. HTMLElement, types, but works with just the Element type.

Issue 2:
When I compile this code:

class A {
constructor() { console.log('new A'); }
}

type AType = A;

function decorator(target: Object, propertyKey: string) {
}

export class B {

@decorator
x: AType = new A();
}

The emitter produces the following code:

var A = (function () {
function A() {
console.log('new A');
}
return A;
})();
function decorator(target, propertyKey) {
}
var B = (function () {
function B() {
this.x = new A();
}
__decorate([
decorator,
__metadata('design:type', Object)
], B.prototype, "x");
return B;
})();
exports.B = B;

But the expected output for metadata should be __metadata('design:type', A). Furthermore, if I change the param declaration to x: A = new A();, the emitter will output __metadata('design:type', ) (type not specified at all).