forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
adb37a5
commit 16b986b
Showing
10 changed files
with
40 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
tests/cases/compiler/objectCreate-errors.ts(1,24): error TS2345: Argument of type '1' is not assignable to parameter of type 'object | null'. | ||
tests/cases/compiler/objectCreate-errors.ts(2,24): error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object | null'. | ||
tests/cases/compiler/objectCreate-errors.ts(3,24): error TS2345: Argument of type 'false' is not assignable to parameter of type 'object | null'. | ||
tests/cases/compiler/objectCreate-errors.ts(1,24): error TS2345: Argument of type 'number' is not assignable to parameter of type 'object'. | ||
tests/cases/compiler/objectCreate-errors.ts(2,24): error TS2345: Argument of type 'string' is not assignable to parameter of type 'object'. | ||
tests/cases/compiler/objectCreate-errors.ts(3,24): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'object'. | ||
tests/cases/compiler/objectCreate-errors.ts(4,24): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object | null'. | ||
tests/cases/compiler/objectCreate-errors.ts(7,24): error TS2345: Argument of type '1' is not assignable to parameter of type 'object | null'. | ||
tests/cases/compiler/objectCreate-errors.ts(8,24): error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object | null'. | ||
tests/cases/compiler/objectCreate-errors.ts(9,24): error TS2345: Argument of type 'false' is not assignable to parameter of type 'object | null'. | ||
tests/cases/compiler/objectCreate-errors.ts(7,24): error TS2345: Argument of type 'number' is not assignable to parameter of type 'object'. | ||
tests/cases/compiler/objectCreate-errors.ts(8,24): error TS2345: Argument of type 'string' is not assignable to parameter of type 'object'. | ||
tests/cases/compiler/objectCreate-errors.ts(9,24): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'object'. | ||
tests/cases/compiler/objectCreate-errors.ts(10,24): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object | null'. | ||
|
||
|
||
==== tests/cases/compiler/objectCreate-errors.ts (8 errors) ==== | ||
var e1 = Object.create(1); // Error | ||
~ | ||
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'object | null'. | ||
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'object'. | ||
var e2 = Object.create("string"); // Error | ||
~~~~~~~~ | ||
!!! error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object | null'. | ||
!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'object'. | ||
var e3 = Object.create(false); // Error | ||
~~~~~ | ||
!!! error TS2345: Argument of type 'false' is not assignable to parameter of type 'object | null'. | ||
!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'object'. | ||
var e4 = Object.create(undefined); // Error | ||
~~~~~~~~~ | ||
!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object | null'. | ||
|
||
|
||
var e5 = Object.create(1, {}); // Error | ||
~ | ||
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'object | null'. | ||
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'object'. | ||
var e6 = Object.create("string", {}); // Error | ||
~~~~~~~~ | ||
!!! error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object | null'. | ||
!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'object'. | ||
var e7 = Object.create(false, {}); // Error | ||
~~~~~ | ||
!!! error TS2345: Argument of type 'false' is not assignable to parameter of type 'object | null'. | ||
!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'object'. | ||
var e8 = Object.create(undefined, {}); // Error | ||
~~~~~~~~~ | ||
!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object | null'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.