Enum TypeScriptImportsNotUsedAsValues
- java.lang.Object
-
- java.lang.Enum<TypeScriptImportsNotUsedAsValues>
-
- io.github.cdklabs.projen.javascript.TypeScriptImportsNotUsedAsValues
-
- All Implemented Interfaces:
Serializable,Comparable<TypeScriptImportsNotUsedAsValues>
@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-03-28T21:16:43.213Z") @Stability(Experimental) public enum TypeScriptImportsNotUsedAsValues extends Enum<TypeScriptImportsNotUsedAsValues>
(experimental) This flag controls howimportworks, there are 3 different options.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ERROR(experimental) This preserves all imports (the same as the preserve option), but will error when a value import is only used as a type.PRESERVE(experimental) Preserves allimportstatements whose values or types are never used.REMOVE(experimental) The default behavior of droppingimportstatements which only reference types.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TypeScriptImportsNotUsedAsValuesvalueOf(String name)Returns the enum constant of this type with the specified name.static TypeScriptImportsNotUsedAsValues[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
REMOVE
@Stability(Experimental) public static final TypeScriptImportsNotUsedAsValues REMOVE
(experimental) The default behavior of droppingimportstatements which only reference types.
-
PRESERVE
@Stability(Experimental) public static final TypeScriptImportsNotUsedAsValues PRESERVE
(experimental) Preserves allimportstatements whose values or types are never used.This can cause imports/side-effects to be preserved.
-
ERROR
@Stability(Experimental) public static final TypeScriptImportsNotUsedAsValues ERROR
(experimental) This preserves all imports (the same as the preserve option), but will error when a value import is only used as a type.This might be useful if you want to ensure no values are being accidentally imported, but still make side-effect imports explicit.
-
-
Method Detail
-
values
public static TypeScriptImportsNotUsedAsValues[] 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 (TypeScriptImportsNotUsedAsValues c : TypeScriptImportsNotUsedAsValues.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TypeScriptImportsNotUsedAsValues 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
-
-