Support BooleanLiteralTypeAnnotation
parent
e24a73b03b
commit
84aface8eb
|
@ -550,6 +550,7 @@ declare module '@babel/types' {
|
|||
|
||||
declare class BooleanLiteralTypeAnnotation extends Node {
|
||||
type: 'BooleanLiteralTypeAnnotation';
|
||||
value: boolean;
|
||||
}
|
||||
|
||||
declare class NullLiteralTypeAnnotation extends Node {
|
||||
|
|
|
@ -108,6 +108,8 @@ function makeType(ctx: Context, node: FlowTypeAnnotation): ?Type {
|
|||
return t.createLiteral(null);
|
||||
case 'BooleanTypeAnnotation':
|
||||
return t.createBoolean();
|
||||
case 'BooleanLiteralTypeAnnotation':
|
||||
return t.createLiteral(node.value);
|
||||
case 'NumberTypeAnnotation':
|
||||
return t.createNumber('f64');
|
||||
case 'StringTypeAnnotation':
|
||||
|
|
Loading…
Reference in New Issue