mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
Yes space after multiline comments
This commit is contained in:
parent
ff0961b85e
commit
dcd2ddd0b7
@ -274,6 +274,9 @@ namespace ts {
|
||||
if (hasTrailingNewLine) {
|
||||
writer.writeLine();
|
||||
}
|
||||
else if (_kind === SyntaxKind.MultiLineCommentTrivia) {
|
||||
writer.write(" ");
|
||||
}
|
||||
}
|
||||
|
||||
function emitLeadingCommentsOfPosition(pos: number) {
|
||||
|
||||
@ -59,4 +59,4 @@ interface B<TBase extends Base> extends A {
|
||||
}
|
||||
var b: B<Derived> = null;
|
||||
var z: Derived = b.foo();
|
||||
*/
|
||||
*/
|
||||
|
||||
@ -8,4 +8,4 @@ var bar;
|
||||
var x;
|
||||
/*
|
||||
var bar;
|
||||
*/
|
||||
*/
|
||||
|
||||
@ -11,7 +11,7 @@ var array = [
|
||||
var array = [
|
||||
/* element 1*/
|
||||
1
|
||||
/* end of element 1 */,
|
||||
/* end of element 1 */ ,
|
||||
2
|
||||
/* end of element 2 */
|
||||
];
|
||||
|
||||
@ -12,8 +12,8 @@ var array = [
|
||||
var array = [
|
||||
/* element 1*/
|
||||
1
|
||||
/* end of element 1 */,
|
||||
/* end of element 1 */ ,
|
||||
2
|
||||
/* end of element 2 */,
|
||||
/* end of element 2 */ ,
|
||||
,
|
||||
];
|
||||
|
||||
@ -7,5 +7,5 @@ function f() {
|
||||
//// [commentOnBlock1.js]
|
||||
// asdf
|
||||
function f() {
|
||||
/*asdf*/{ }
|
||||
/*asdf*/ { }
|
||||
}
|
||||
|
||||
@ -29,4 +29,4 @@ function () { });
|
||||
foo(/*c7*/ function () { });
|
||||
foo(
|
||||
/*c7*/
|
||||
/*c8*/function () { });
|
||||
/*c8*/ function () { });
|
||||
|
||||
@ -17,7 +17,7 @@ foo(/*c2*/ 1, /*d2*/ 1 + 2, /*e1*/ a + b);
|
||||
foo(/*c3*/ function () { }, /*d2*/ function () { }, /*e2*/ a + /*e3*/ b);
|
||||
foo(/*c3*/ function () { }, /*d3*/ function () { }, /*e3*/ (a + b));
|
||||
foo(
|
||||
/*c4*/function () { },
|
||||
/*d4*/function () { },
|
||||
/*c4*/ function () { },
|
||||
/*d4*/ function () { },
|
||||
/*e4*/
|
||||
/*e5*/"hello");
|
||||
/*e5*/ "hello");
|
||||
|
||||
@ -178,7 +178,7 @@ jsDocMultiLine();
|
||||
*New line1
|
||||
*New Line2*/
|
||||
/** Shoul mege this line as well
|
||||
* and this too*//** Another this one too*/
|
||||
* and this too*/ /** Another this one too*/
|
||||
function jsDocMultiLineMerge() {
|
||||
}
|
||||
jsDocMultiLineMerge();
|
||||
@ -188,23 +188,23 @@ function jsDocMixedComments1() {
|
||||
}
|
||||
jsDocMixedComments1();
|
||||
/// Triple slash comment
|
||||
/** jsdoc comment *//*** another jsDocComment*/
|
||||
/** jsdoc comment */ /*** another jsDocComment*/
|
||||
function jsDocMixedComments2() {
|
||||
}
|
||||
jsDocMixedComments2();
|
||||
/** jsdoc comment *//*** another jsDocComment*/
|
||||
/** jsdoc comment */ /*** another jsDocComment*/
|
||||
/// Triple slash comment
|
||||
function jsDocMixedComments3() {
|
||||
}
|
||||
jsDocMixedComments3();
|
||||
/** jsdoc comment *//*** another jsDocComment*/
|
||||
/** jsdoc comment */ /*** another jsDocComment*/
|
||||
/// Triple slash comment
|
||||
/// Triple slash comment 2
|
||||
function jsDocMixedComments4() {
|
||||
}
|
||||
jsDocMixedComments4();
|
||||
/// Triple slash comment 1
|
||||
/** jsdoc comment *//*** another jsDocComment*/
|
||||
/** jsdoc comment */ /*** another jsDocComment*/
|
||||
/// Triple slash comment
|
||||
/// Triple slash comment 2
|
||||
function jsDocMixedComments5() {
|
||||
|
||||
@ -86,8 +86,8 @@ function blah3(a // trailing commen single line
|
||||
) {
|
||||
}
|
||||
lambdaFoo = function (a, b) { return a * b; }; // This is trailing comment
|
||||
/*leading comment*/(function () { return 0; }); // Needs to be wrapped in parens to be a valid expression (not declaration)
|
||||
/*leading comment*/(function () { return 0; }); //trailing comment
|
||||
/*leading comment*/ (function () { return 0; }); // Needs to be wrapped in parens to be a valid expression (not declaration)
|
||||
/*leading comment*/ (function () { return 0; }); //trailing comment
|
||||
function blah4(/*1*/ a /*2*/, /*3*/ b /*4*/) {
|
||||
}
|
||||
function foo1() {
|
||||
|
||||
@ -18,7 +18,7 @@ var resolve = {
|
||||
id: /*! @ngInject */ function (details) { return details.id; },
|
||||
id1: /* c1 */ "hello",
|
||||
id2:
|
||||
/*! @ngInject */function (details) { return details.id; },
|
||||
/*! @ngInject */ function (details) { return details.id; },
|
||||
id3:
|
||||
/*! @ngInject */
|
||||
function (details) { return details.id; },
|
||||
|
||||
@ -56,4 +56,4 @@ var c: C<number>;
|
||||
var cc: C<C<number>>;
|
||||
|
||||
c = c.m(cc);
|
||||
*/
|
||||
*/
|
||||
|
||||
@ -5,4 +5,4 @@
|
||||
|
||||
|
||||
//// [parserSkippedTokens10.js]
|
||||
/*existing trivia*/;
|
||||
/*existing trivia*/ ;
|
||||
|
||||
@ -78,4 +78,4 @@ declare module MsPortal.Controls.Base.ItemList {
|
||||
class ViewModel<TValue> extends ItemValue<TValue> {
|
||||
}
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
@ -26,4 +26,4 @@
|
||||
*/
|
||||
/*CHECK#1/
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user