Skip to content

Commit e18901a

Browse files
Revert "remove extra files"
This reverts commit b293257.
1 parent b293257 commit e18901a

File tree

3 files changed

+95
-0
lines changed

3 files changed

+95
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
tests/cases/compiler/assigningFromObjecToAnythingElse.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/assigningFromObjecToAnythingElse.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/assigningFromObjecToAnythingElse.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/assigningFromObjecToAnythingElse.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/assigningFromObjecToAnythingElse.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+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//// [assigningFromObjecToAnythingElse.ts]
2+
var x: Object;
3+
var y: RegExp;
4+
y = x;
5+
6+
var a: String = Object.create<Object>("");
7+
var c: String = Object.create<Number>(1);
8+
9+
var w: Error = new Object();
10+
11+
12+
//// [assigningFromObjecToAnythingElse.js]
13+
var x;
14+
var y;
15+
y = x;
16+
var a = Object.create("");
17+
var c = Object.create(1);
18+
var w = new Object();
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
public
2+
class NonPublicClass {
3+
public s() {
4+
}
5+
}
6+
7+
class NonPublicClass2 {
8+
public
9+
private nonPublicFunction() {
10+
}
11+
}
12+
private
13+
class NonPrivateClass {
14+
private s() {
15+
}
16+
}
17+
18+
class NonPrivateClass2 {
19+
private
20+
public nonPrivateFunction() {
21+
}
22+
}
23+
protected
24+
class NonProtectedClass {
25+
protected s() {
26+
}
27+
}
28+
29+
class NonProtectedClass2 {
30+
protected
31+
public nonProtectedFunction() {
32+
}
33+
}
34+
35+
class ClassWithThreeMembers {
36+
public
37+
private
38+
protected
39+
}

0 commit comments

Comments
 (0)