public final class FeatureSet extends Object
In the long term, it would be good to disentangle all these concerns and pull out a single LanguageSyntax enum with a separate strict mode flag, and then these could possibly be unified.
Modifier and Type | Field and Description |
---|---|
static FeatureSet |
ES3
The bare minimum set of features in ES3.
|
static FeatureSet |
ES5
Features from ES5 only.
|
static FeatureSet |
ES6
The full set of ES6 features, not including modules.
|
static FeatureSet |
ES6_IMPL
The subset of ES6 features that are implemented in stable Chrome, Firefox, and Edge.
|
static FeatureSet |
ES6_MODULES
All ES6 features, including modules.
|
static FeatureSet |
TYPESCRIPT
TypeScript syntax.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
boolean |
hasEs6Modules()
Returns whether this feature set includes ES6 modules.
|
int |
hashCode() |
boolean |
isTypeScript()
Returns whether this feature set includes typescript features.
|
FeatureSet |
require(FeatureSet other)
Returns a feature set combining all the features from
this and other . |
String |
version()
Returns a string representation suitable for encoding in depgraph and deps.js files.
|
public static final FeatureSet ES3
public static final FeatureSet ES5
public static final FeatureSet ES6_IMPL
public static final FeatureSet ES6
public static final FeatureSet ES6_MODULES
public static final FeatureSet TYPESCRIPT
public String version()
public boolean hasEs6Modules()
public boolean isTypeScript()
public FeatureSet require(FeatureSet other)
this
and other
.Copyright © 2009-2015 Google. All Rights Reserved.