Add group around TSMethodSignature (#2037)
This ensures that the comment size is not taken into account during measurement Fixes #1976master
parent
09f147decd
commit
b730f4eccf
|
@ -2453,7 +2453,7 @@ function genericPrintNoParens(path, options, print, args) {
|
|||
if (n.typeAnnotation) {
|
||||
parts.push(": ", path.call(print, "typeAnnotation"));
|
||||
}
|
||||
return concat(parts);
|
||||
return group(concat(parts));
|
||||
case "TSNamespaceExportDeclaration":
|
||||
if (n.declaration) {
|
||||
// Temporary fix until https://github.com/eslint/typescript-eslint-parser/issues/263
|
||||
|
|
|
@ -9,6 +9,19 @@ abstract interface I {}
|
|||
|
||||
`;
|
||||
|
||||
exports[`comments.js 1`] = `
|
||||
interface ScreenObject {
|
||||
// I make things weird.
|
||||
at(point: Point): Screen | undefined;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
interface ScreenObject {
|
||||
// I make things weird.
|
||||
at(point: Point): Screen | undefined;
|
||||
}
|
||||
|
||||
`;
|
||||
|
||||
exports[`separator.ts 1`] = `
|
||||
declare module 'selenium-webdriver' {
|
||||
export const until: {
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
interface ScreenObject {
|
||||
// I make things weird.
|
||||
at(point: Point): Screen | undefined;
|
||||
}
|
Loading…
Reference in New Issue