From ee72b6f183410d4bc6850350a1f465c1a9a52213 Mon Sep 17 00:00:00 2001 From: Tim Kendrick Date: Wed, 13 Jun 2018 15:31:28 +0100 Subject: [PATCH] [babel-types] Allow implicit boolean JSXAttribute values --- types/babel-types/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/babel-types/index.d.ts b/types/babel-types/index.d.ts index 47068c3481..c464c4bc3f 100644 --- a/types/babel-types/index.d.ts +++ b/types/babel-types/index.d.ts @@ -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, selfClosing?: boolean): JSXElement; export function jSXEmptyExpression(): JSXEmptyExpression;