|
| 1 | +tests/cases/compiler/assigningFromObjectToAnythingElse.ts(3,1): error TS2322: Type 'Object' is not assignable to type 'RegExp'. |
| 2 | + The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? |
| 3 | + Property 'exec' is missing in type 'Object'. |
| 4 | +tests/cases/compiler/assigningFromObjectToAnythingElse.ts(5,5): error TS2322: Type 'Object' is not assignable to type 'String'. |
| 5 | + The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? |
| 6 | + Property 'charAt' is missing in type 'Object'. |
| 7 | +tests/cases/compiler/assigningFromObjectToAnythingElse.ts(6,5): error TS2322: Type 'Number' is not assignable to type 'String'. |
| 8 | + Property 'charAt' is missing in type 'Number'. |
| 9 | +tests/cases/compiler/assigningFromObjectToAnythingElse.ts(8,5): error TS2322: Type 'Object' is not assignable to type 'Error'. |
| 10 | + The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? |
| 11 | + Property 'name' is missing in type 'Object'. |
| 12 | + |
| 13 | + |
| 14 | +==== tests/cases/compiler/assigningFromObjectToAnythingElse.ts (4 errors) ==== |
| 15 | + var x: Object; |
| 16 | + var y: RegExp; |
| 17 | + y = x; |
| 18 | + ~ |
| 19 | +!!! error TS2322: Type 'Object' is not assignable to type 'RegExp'. |
| 20 | +!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? |
| 21 | +!!! error TS2322: Property 'exec' is missing in type 'Object'. |
| 22 | + |
| 23 | + var a: String = Object.create<Object>(""); |
| 24 | + ~ |
| 25 | +!!! error TS2322: Type 'Object' is not assignable to type 'String'. |
| 26 | +!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? |
| 27 | +!!! error TS2322: Property 'charAt' is missing in type 'Object'. |
| 28 | + var c: String = Object.create<Number>(1); |
| 29 | + ~ |
| 30 | +!!! error TS2322: Type 'Number' is not assignable to type 'String'. |
| 31 | +!!! error TS2322: Property 'charAt' is missing in type 'Number'. |
| 32 | + |
| 33 | + var w: Error = new Object(); |
| 34 | + ~ |
| 35 | +!!! error TS2322: Type 'Object' is not assignable to type 'Error'. |
| 36 | +!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? |
| 37 | +!!! error TS2322: Property 'name' is missing in type 'Object'. |
| 38 | + |
0 commit comments