TypeScript/tests/baselines/reference/commentsVarDecl.types

84 lines
1.9 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/commentsVarDecl.ts ===
/** Variable comments*/
var myVariable = 10; // This trailing Comment1
>myVariable : number
2015-04-13 21:36:11 +02:00
>10 : number
2014-08-15 23:33:16 +02:00
/** This is another variable comment*/
var anotherVariable = 30;
>anotherVariable : number
2015-04-13 21:36:11 +02:00
>30 : number
2014-08-15 23:33:16 +02:00
// shouldn't appear
var aVar = "";
>aVar : string
2015-04-13 21:36:11 +02:00
>"" : string
2014-08-15 23:33:16 +02:00
/** this is multiline comment
* All these variables are of number type */
var anotherAnotherVariable = 70; /* these are multiple trailing comments */ /* multiple trailing comments */
>anotherAnotherVariable : number
2015-04-13 21:36:11 +02:00
>70 : number
2014-08-15 23:33:16 +02:00
/** Triple slash multiline comment*/
/** another line in the comment*/
/** comment line 2*/
var x = 70; /* multiline trailing comment
>x : number
2015-04-13 21:36:11 +02:00
>70 : number
2014-08-15 23:33:16 +02:00
this is multiline trailing comment */
2014-08-15 23:33:16 +02:00
/** Triple slash comment on the assignement shouldnt be in .d.ts file*/
x = myVariable;
>x = myVariable : number
>x : number
>myVariable : number
2014-08-15 23:33:16 +02:00
/** triple slash comment1*/
/** jsdocstyle comment - only this comment should be in .d.ts file*/
var n = 30;
>n : number
2015-04-13 21:36:11 +02:00
>30 : number
2014-08-15 23:33:16 +02:00
/** var deckaration with comment on type as well*/
var y = /** value comment */ 20;
>y : number
2015-04-13 21:36:11 +02:00
>20 : number
2014-08-15 23:33:16 +02:00
/// var deckaration with comment on type as well
var yy =
>yy : number
2014-08-15 23:33:16 +02:00
/// value comment
20;
2015-04-13 21:36:11 +02:00
>20 : number
2014-08-15 23:33:16 +02:00
/** comment2 */
var z = /** lambda comment */ (x: number, y: number) => x + y;
>z : (x: number, y: number) => number
2014-08-15 23:33:16 +02:00
>(x: number, y: number) => x + y : (x: number, y: number) => number
>x : number
>y : number
2014-08-15 23:33:16 +02:00
>x + y : number
>x : number
>y : number
2014-08-15 23:33:16 +02:00
var z2: /** type comment*/ (x: number) => string;
>z2 : (x: number) => string
>x : number
2014-08-15 23:33:16 +02:00
var x2 = z2;
>x2 : (x: number) => string
>z2 : (x: number) => string
2014-08-15 23:33:16 +02:00
var n4: (x: number) => string;
>n4 : (x: number) => string
>x : number
2014-08-15 23:33:16 +02:00
n4 = z2;
>n4 = z2 : (x: number) => string
>n4 : (x: number) => string
>z2 : (x: number) => string
2014-08-15 23:33:16 +02:00