Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6ed94b1 + 7ae4ff3 commit 25f4e46Copy full SHA for 25f4e46
src/compiler/checker.ts
@@ -6892,6 +6892,7 @@ namespace ts {
6892
case "Null":
6893
return nullType;
6894
case "Object":
6895
+ case "object":
6896
return anyType;
6897
case "Function":
6898
case "function":
tests/baselines/reference/checkJsdocTypeTag1.js
@@ -28,7 +28,17 @@ x1(0);
28
29
/** @type {function (number): number} */
30
const x2 = (a) => a + 1;
31
-x2(0);
+x2(0);
32
+
33
+/**
34
+ * @type {object}
35
+ */
36
+var props = {};
37
38
39
+ * @type {Object}
40
41
42
43
//// [0.js]
44
// @ts-check
@@ -54,3 +64,11 @@ x1(0);
54
64
55
65
var x2 = function (a) { return a + 1; };
56
66
x2(0);
67
68
69
70
71
72
73
74
tests/baselines/reference/checkJsdocTypeTag1.symbols
@@ -58,3 +58,15 @@ const x2 = (a) => a + 1;
58
59
>x2 : Symbol(x2, Decl(0.js, 28, 5))
60
61
62
63
+>props : Symbol(props, Decl(0.js, 34, 3), Decl(0.js, 39, 3))
tests/baselines/reference/checkJsdocTypeTag1.types
@@ -86,3 +86,17 @@ x2(0);
86
>x2 : (arg0: number) => number
87
>0 : 0
88
89
90
91
92
93
+>props : any
94
+>{} : {}
95
96
97
98
99
100
101
102
tests/baselines/reference/jsdocTypeTag.js
@@ -55,6 +55,9 @@ var nullable;
/** @type {Object} */
var Obj;
57
+/** @type {object} */
+var obj;
/** @type {Function} */
var Func;
@@ -77,6 +80,7 @@ var P: Promise<any>;
77
80
var p: Promise<any>;
78
81
var nullable: number | null;
79
82
var Obj: any;
83
+var obj: any;
84
var Func: Function;
85
@@ -117,6 +121,8 @@ var p;
117
121
var nullable;
118
122
119
123
124
125
120
126
127
128
//// [b.js]
@@ -138,4 +144,5 @@ var P;
138
144
var p;
139
145
140
146
147
141
148
tests/baselines/reference/jsdocTypeTag.symbols
@@ -71,9 +71,13 @@ var nullable;
>Obj : Symbol(Obj, Decl(a.js, 52, 3), Decl(b.ts, 17, 3))
75
76
+>obj : Symbol(obj, Decl(a.js, 55, 3), Decl(b.ts, 18, 3))
->Func : Symbol(Func, Decl(a.js, 55, 3), Decl(b.ts, 18, 3))
+>Func : Symbol(Func, Decl(a.js, 58, 3), Decl(b.ts, 19, 3))
=== tests/cases/conformance/jsdoc/b.ts ===
var S: string;
@@ -132,7 +136,10 @@ var nullable: number | null;
132
136
133
137
134
135
142
143
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
tests/baselines/reference/jsdocTypeTag.types
@@ -71,6 +71,10 @@ var nullable;
>Obj : any
+>obj : any
>Func : Function
@@ -135,6 +139,9 @@ var nullable: number | null;
>Function : Function
tests/cases/conformance/jsdoc/checkJsdocTypeTag1.ts
@@ -31,4 +31,14 @@ x1(0);
tests/cases/conformance/jsdoc/jsdocTypeTag.ts
@@ -57,6 +57,9 @@ var nullable;
@@ -79,4 +82,5 @@ var P: Promise<any>;
0 commit comments