Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve generation of comments without location (#15037)
- Loading branch information
1 parent
ddaee90
commit 9a0c496
Showing
7 changed files
with
269 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...el-plugin-transform-flow-comments/test/fixtures/flow-comments/class-prop-values/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
class X { | ||
foo = 2; | ||
bar /*: number*/ = 3; /*:: baz: ?string*/ | ||
bar /*: number*/ = 3; | ||
/*:: baz: ?string*/ | ||
} |
3 changes: 2 additions & 1 deletion
3
...el-plugin-transform-flow-comments/test/fixtures/flow-comments/def-site-variance/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
class C /*:: <+T, -U>*/{} | ||
function f /*:: <+T, -U>*/() {} /*:: type T<+T, -U> = {};*/ | ||
function f /*:: <+T, -U>*/() {} | ||
/*:: type T<+T, -U> = {};*/ |
6 changes: 4 additions & 2 deletions
6
...babel-plugin-transform-flow-comments/test/fixtures/flow-comments/import-export/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
/*:: export type { A } from './types';*/import lib from 'library'; | ||
export { foo } from 'foo'; /*:: export type { B, C } from './types';*/ | ||
/*:: export type { A } from './types';*/ | ||
import lib from 'library'; | ||
export { foo } from 'foo'; | ||
/*:: export type { B, C } from './types';*/ |
3 changes: 2 additions & 1 deletion
3
...plugin-transform-flow-comments/test/fixtures/flow-comments/import-type-alias-2/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...l-plugin-transform-flow-comments/test/fixtures/flow-comments/import-type-alias/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/*:: import type A, { B, C } from './types';*/import lib from 'library'; | ||
/*:: import type A, { B, C } from './types';*/ | ||
import lib from 'library'; | ||
/*:: import type D from './types';*/ | ||
/*:: import typeof E, { F, G } from './types';*/ |