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