forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkJsdocReturnTag2.errors.txt
27 lines (24 loc) · 1.25 KB
/
checkJsdocReturnTag2.errors.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
error TS5101: Option 'out' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.
tests/cases/conformance/jsdoc/returns.js(6,5): error TS2322: Type 'number' is not assignable to type 'string'.
tests/cases/conformance/jsdoc/returns.js(13,5): error TS2322: Type 'number | boolean' is not assignable to type 'string | number'.
Type 'boolean' is not assignable to type 'string | number'.
!!! error TS5101: Option 'out' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.
==== tests/cases/conformance/jsdoc/returns.js (2 errors) ====
// @ts-check
/**
* @returns {string} This comment is not currently exposed
*/
function f() {
return 5;
~~~~~~~~~
!!! error TS2322: Type 'number' is not assignable to type 'string'.
}
/**
* @returns {string | number} This comment is not currently exposed
*/
function f1() {
return 5 || true;
~~~~~~~~~~~~~~~~~
!!! error TS2322: Type 'number | boolean' is not assignable to type 'string | number'.
!!! error TS2322: Type 'boolean' is not assignable to type 'string | number'.
}