[Types] fix generated TS/Flow comment types (#9007)
This commit is contained in:
parent
62233ed7c9
commit
4dfd801887
@ -15,12 +15,12 @@ declare class ${NODE_PREFIX}Comment {
|
|||||||
loc: ${NODE_PREFIX}SourceLocation;
|
loc: ${NODE_PREFIX}SourceLocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare class ${NODE_PREFIX}BlockComment extends ${NODE_PREFIX}Comment {
|
declare class ${NODE_PREFIX}CommentBlock extends ${NODE_PREFIX}Comment {
|
||||||
type: "BlockComment";
|
type: "CommentBlock";
|
||||||
}
|
}
|
||||||
|
|
||||||
declare class ${NODE_PREFIX}LineComment extends ${NODE_PREFIX}Comment {
|
declare class ${NODE_PREFIX}CommentLine extends ${NODE_PREFIX}Comment {
|
||||||
type: "LineComment";
|
type: "CommentLine";
|
||||||
}
|
}
|
||||||
|
|
||||||
declare class ${NODE_PREFIX}SourceLocation {
|
declare class ${NODE_PREFIX}SourceLocation {
|
||||||
|
|||||||
@ -11,18 +11,18 @@ interface BaseComment {
|
|||||||
start: number;
|
start: number;
|
||||||
end: number;
|
end: number;
|
||||||
loc: SourceLocation;
|
loc: SourceLocation;
|
||||||
type: "BlockComment" | "LineComment";
|
type: "CommentBlock" | "CommentLine";
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BlockComment extends BaseComment {
|
export interface CommentBlock extends BaseComment {
|
||||||
type: "BlockComment";
|
type: "CommentBlock";
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LineComment extends BaseComment {
|
export interface CommentLine extends BaseComment {
|
||||||
type: "LineComment";
|
type: "CommentLine";
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Comment = BlockComment | LineComment;
|
export type Comment = CommentBlock | CommentLine;
|
||||||
|
|
||||||
export interface SourceLocation {
|
export interface SourceLocation {
|
||||||
start: {
|
start: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user