Enum TypeScriptModuleDetection
- java.lang.Object
-
- java.lang.Enum<TypeScriptModuleDetection>
-
- io.github.cdklabs.projen.javascript.TypeScriptModuleDetection
-
- All Implemented Interfaces:
Serializable,Comparable<TypeScriptModuleDetection>
@Generated(value="jsii-pacmak/1.100.0 (build 6a776be)", date="2024-06-21T23:10:12.160Z") @Stability(Experimental) public enum TypeScriptModuleDetection extends Enum<TypeScriptModuleDetection>
(experimental) This setting controls how TypeScript determines whether a file is a script or a module.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTO(experimental) TypeScript will not only look for import and export statements, but it will also check whether the "type" field in a package.json is set to "module" when running with module: nodenext or node16, and check whether the current file is a JSX file when running under jsx: react-jsx.FORCE(experimental) Ensures that every non-declaration file is treated as a module.LEGACY(experimental) The same behavior as 4.6 and prior, usings import and export statements to determine whether a file is a module.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TypeScriptModuleDetectionvalueOf(String name)Returns the enum constant of this type with the specified name.static TypeScriptModuleDetection[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AUTO
@Stability(Experimental) public static final TypeScriptModuleDetection AUTO
(experimental) TypeScript will not only look for import and export statements, but it will also check whether the "type" field in a package.json is set to "module" when running with module: nodenext or node16, and check whether the current file is a JSX file when running under jsx: react-jsx.
-
LEGACY
@Stability(Experimental) public static final TypeScriptModuleDetection LEGACY
(experimental) The same behavior as 4.6 and prior, usings import and export statements to determine whether a file is a module.
-
FORCE
@Stability(Experimental) public static final TypeScriptModuleDetection FORCE
(experimental) Ensures that every non-declaration file is treated as a module.
-
-
Method Detail
-
values
public static TypeScriptModuleDetection[] 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 (TypeScriptModuleDetection c : TypeScriptModuleDetection.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TypeScriptModuleDetection 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
-
-