Skip to content

Commit

Permalink
[Types] fix generated TS/Flow comment types (#9007)
Browse files Browse the repository at this point in the history
  • Loading branch information
ljqx authored and existentialism committed Nov 9, 2018
1 parent 62233ed commit 4dfd801
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions scripts/generators/flow.js
Expand Up @@ -15,12 +15,12 @@ declare class ${NODE_PREFIX}Comment {
loc: ${NODE_PREFIX}SourceLocation;
}
declare class ${NODE_PREFIX}BlockComment extends ${NODE_PREFIX}Comment {
type: "BlockComment";
declare class ${NODE_PREFIX}CommentBlock extends ${NODE_PREFIX}Comment {
type: "CommentBlock";
}
declare class ${NODE_PREFIX}LineComment extends ${NODE_PREFIX}Comment {
type: "LineComment";
declare class ${NODE_PREFIX}CommentLine extends ${NODE_PREFIX}Comment {
type: "CommentLine";
}
declare class ${NODE_PREFIX}SourceLocation {
Expand Down
12 changes: 6 additions & 6 deletions scripts/generators/typescript.js
Expand Up @@ -11,18 +11,18 @@ interface BaseComment {
start: number;
end: number;
loc: SourceLocation;
type: "BlockComment" | "LineComment";
type: "CommentBlock" | "CommentLine";
}
export interface BlockComment extends BaseComment {
type: "BlockComment";
export interface CommentBlock extends BaseComment {
type: "CommentBlock";
}
export interface LineComment extends BaseComment {
type: "LineComment";
export interface CommentLine extends BaseComment {
type: "CommentLine";
}
export type Comment = BlockComment | LineComment;
export type Comment = CommentBlock | CommentLine;
export interface SourceLocation {
start: {
Expand Down

0 comments on commit 4dfd801

Please sign in to comment.