last-arg.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. type f = (
  2. currentRequest: {a: number},
  3. // TODO this is a very very very very long comment that makes it go > 80 columns
  4. ) => number;
  5. f = (
  6. currentRequest: {a: number},
  7. // TODO this is a very very very very long comment that makes it go > 80 columns
  8. ): number => {};
  9. f = (
  10. currentRequest: {a: number},
  11. // TODO this is a very very very very long comment that makes it go > 80 columns
  12. ) => {};
  13. f = function(
  14. currentRequest: {a: number},
  15. // TODO this is a very very very very long comment that makes it go > 80 columns
  16. ) {};
  17. class X {
  18. f(
  19. currentRequest: {a: number},
  20. // TODO this is a very very very very long comment that makes it go > 80 columns
  21. ) {}
  22. }
  23. function f(
  24. a: number
  25. // some comment here
  26. ): number {
  27. return a + 1;
  28. }
  29. var x = {
  30. getSectionMode(
  31. pageMetaData: PageMetaData,
  32. sectionMetaData: SectionMetaData
  33. /* $FlowFixMe This error was exposed while converting keyMirror
  34. * to keyMirrorRecursive */
  35. ): $Enum<SectionMode> {
  36. }
  37. }
  38. class X {
  39. getSectionMode(
  40. pageMetaData: PageMetaData,
  41. sectionMetaData: SectionMetaData = ['unknown']
  42. /* $FlowFixMe This error was exposed while converting keyMirror
  43. * to keyMirrorRecursive */
  44. ): $Enum<SectionMode> {
  45. }
  46. }
  47. class Foo {
  48. a(lol /*string*/) {}
  49. b(lol /*string*/
  50. ) {}
  51. d(
  52. lol /*string*/,
  53. lol2 /*string*/,
  54. lol3 /*string*/,
  55. lol4 /*string*/
  56. ) {}
  57. d(
  58. lol /*string*/,
  59. lol2 /*string*/,
  60. lol3 /*string*/,
  61. lol4 /*string*/
  62. ) /*string*/ {}
  63. // prettier-ignore
  64. c(lol /*string*/
  65. ) {}
  66. // prettier-ignore
  67. d(
  68. lol /*string*/,
  69. lol2 /*string*/,
  70. lol3 /*string*/,
  71. lol4 /*string*/
  72. ) {}
  73. // prettier-ignore
  74. e(
  75. lol /*string*/,
  76. lol2 /*string*/,
  77. lol3 /*string*/,
  78. lol4 /*string*/
  79. ) {} /* string*/
  80. }