Enum TypeScriptImportsNotUsedAsValues

    • Enum Constant Detail

      • REMOVE

        @Stability(Experimental)
        public static final TypeScriptImportsNotUsedAsValues REMOVE
        (experimental) The default behavior of dropping import statements which only reference types.
      • PRESERVE

        @Stability(Experimental)
        public static final TypeScriptImportsNotUsedAsValues PRESERVE
        (experimental) Preserves all import statements 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 name
        NullPointerException - if the argument is null