Enum TypeScriptJsxMode
- java.lang.Object
-
- java.lang.Enum<TypeScriptJsxMode>
-
- io.github.cdklabs.projen.javascript.TypeScriptJsxMode
-
- All Implemented Interfaces:
Serializable,Comparable<TypeScriptJsxMode>
@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-03-28T21:16:43.213Z") @Stability(Experimental) public enum TypeScriptJsxMode extends Enum<TypeScriptJsxMode>
(experimental) Determines how JSX should get transformed into valid JavaScript.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description PRESERVE(experimental) Keeps the JSX as part of the output to be further consumed by another transform step (e.g.REACT(experimental) Converts JSX syntax into React.createElement, does not need to go through a JSX transformation before use, and the output will have a .js file extension.REACT_JSX(experimental) Passeskeyseparately from props and always passeschildrenas props (since React 17).REACT_JSXDEV(experimental) Same asREACT_JSXwith additional debug data.REACT_NATIVE(experimental) Keeps all JSX like 'preserve' mode, but output will have a .js extension.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TypeScriptJsxModevalueOf(String name)Returns the enum constant of this type with the specified name.static TypeScriptJsxMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PRESERVE
@Stability(Experimental) public static final TypeScriptJsxMode PRESERVE
(experimental) Keeps the JSX as part of the output to be further consumed by another transform step (e.g. Babel).
-
REACT
@Stability(Experimental) public static final TypeScriptJsxMode REACT
(experimental) Converts JSX syntax into React.createElement, does not need to go through a JSX transformation before use, and the output will have a .js file extension.
-
REACT_NATIVE
@Stability(Experimental) public static final TypeScriptJsxMode REACT_NATIVE
(experimental) Keeps all JSX like 'preserve' mode, but output will have a .js extension.
-
REACT_JSX
@Stability(Experimental) public static final TypeScriptJsxMode REACT_JSX
(experimental) Passeskeyseparately from props and always passeschildrenas props (since React 17).
-
REACT_JSXDEV
@Stability(Experimental) public static final TypeScriptJsxMode REACT_JSXDEV
(experimental) Same asREACT_JSXwith additional debug data.
-
-
Method Detail
-
values
public static TypeScriptJsxMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TypeScriptJsxMode c : TypeScriptJsxMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TypeScriptJsxMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-