Merge pull request #13505 from Microsoft/fix13504

Emit 'object' type in declaration emitter
This commit is contained in:
Ron Buckton
2017-01-16 15:05:41 -08:00
committed by GitHub
9 changed files with 44 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
// @declaration: true
interface WithNonPrimitive {
foo: object
}

View File

@@ -1,3 +1,4 @@
// @declaration: true
function takeObject(o: object) {}
function returnObject(): object {
return {};

View File

@@ -1,3 +1,4 @@
// @declaration: true
function generic<T>(t: T) {
var o: object = t; // expect error
}

View File

@@ -1,3 +1,4 @@
// @declaration: true
var a: object & string = ""; // error
var b: object | string = ""; // ok
a = b; // error