mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Merge pull request #13505 from Microsoft/fix13504
Emit 'object' type in declaration emitter
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// @declaration: true
|
||||
interface WithNonPrimitive {
|
||||
foo: object
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// @declaration: true
|
||||
function takeObject(o: object) {}
|
||||
function returnObject(): object {
|
||||
return {};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// @declaration: true
|
||||
function generic<T>(t: T) {
|
||||
var o: object = t; // expect error
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// @declaration: true
|
||||
var a: object & string = ""; // error
|
||||
var b: object | string = ""; // ok
|
||||
a = b; // error
|
||||
|
||||
Reference in New Issue
Block a user