Add group around TSMethodSignature (#2037)

This ensures that the comment size is not taken into account during measurement

Fixes #1976
This commit is contained in:
Christopher Chedeau authored and GitHub committed 2017-06-07 14:20:55 -07:00
1 parent 09f147decd
commit b730f4eccf
3 files changed
+18 -1

No files matched your search

+1 -1
View File
@@ -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: {
+4
View File
@@ -0,0 +1,4 @@
interface ScreenObject {
// I make things weird.
at(point: Point): Screen | undefined;
}