Merge pull request #26514 from timkendrick/fix/babel-types-jsx-attribute-value

[babel-types] Allow implicit boolean JSXAttribute values
This commit is contained in:
Nathan Shively-Sanders
2018-06-18 12:57:19 -07:00
committed by GitHub

View File

@@ -772,7 +772,7 @@ export interface VoidTypeAnnotation extends Node {
export interface JSXAttribute extends Node {
type: "JSXAttribute";
name: JSXIdentifier | JSXNamespacedName;
value: JSXElement | StringLiteral | JSXExpressionContainer;
value: JSXElement | StringLiteral | JSXExpressionContainer | null;
}
export interface JSXClosingElement extends Node {
@@ -1424,7 +1424,7 @@ export function objectTypeProperty(key?: Expression, value?: FlowTypeAnnotation)
export function qualifiedTypeIdentifier(id?: Identifier, qualification?: Identifier | QualifiedTypeIdentifier): QualifiedTypeIdentifier;
export function unionTypeAnnotation(types?: FlowTypeAnnotation[]): UnionTypeAnnotation;
export function voidTypeAnnotation(): VoidTypeAnnotation;
export function jSXAttribute(name?: JSXIdentifier | JSXNamespacedName, value?: JSXElement | StringLiteral | JSXExpressionContainer): JSXAttribute;
export function jSXAttribute(name?: JSXIdentifier | JSXNamespacedName, value?: JSXElement | StringLiteral | JSXExpressionContainer | null): JSXAttribute;
export function jSXClosingElement(name?: JSXIdentifier | JSXMemberExpression): JSXClosingElement;
export function jSXElement(openingElement?: JSXOpeningElement, closingElement?: JSXClosingElement, children?: Array<JSXElement | JSXExpressionContainer | JSXText>, selfClosing?: boolean): JSXElement;
export function jSXEmptyExpression(): JSXEmptyExpression;