| Package | Description |
|---|---|
| com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
| com.google.javascript.jscomp.newtypes | |
| com.google.javascript.rhino |
The core AST from Rhino.
|
| com.google.javascript.rhino.jstype |
Provides abstractions to represent types in JavaScript.
|
| Modifier and Type | Method and Description |
|---|---|
TypeMatchingStrategy.MatchResult |
TypeMatchingStrategy.match(TypeI templateType,
TypeI type) |
| Modifier and Type | Class and Description |
|---|---|
class |
JSType |
| Modifier and Type | Method and Description |
|---|---|
TypeI |
JSType.convertMethodToFunction() |
TypeI |
JSType.getEnumeratedTypeOfEnumObject() |
TypeI |
JSType.getGreatestSubtypeWithProperty(String pname) |
TypeI |
JSType.getLegacyResolvedType() |
TypeI |
JSType.getPropertyType(String propName) |
TypeI |
JSType.getReturnType() |
TypeI |
JSType.getTypeOfThis() |
TypeI |
JSType.meetWith(TypeI other) |
TypeI |
JSType.restrictByNotNullOrUndefined() |
| Modifier and Type | Method and Description |
|---|---|
Iterable<TypeI> |
JSType.getParameterTypes() |
com.google.common.collect.ImmutableList<? extends TypeI> |
JSType.getTemplateTypes() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
JSType.isEquivalentTo(TypeI type) |
boolean |
JSType.isSubtypeOf(TypeI other) |
boolean |
JSType.isSubtypeWithoutStructuralTyping(TypeI other) |
TypeI |
JSType.meetWith(TypeI other) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
JSType.acceptsArguments(List<? extends TypeI> argumentTypes) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
TypeIEnv<T extends TypeI>
A map from type names to types.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
FunctionTypeI |
interface |
ObjectTypeI |
| Modifier and Type | Method and Description |
|---|---|
<T extends TypeI> |
TypeIRegistry.getNativeType(JSTypeNative typeId) |
<T extends TypeI> |
TypeIRegistry.getType(String typeName) |
| Modifier and Type | Method and Description |
|---|---|
TypeI |
TypeI.autobox() |
TypeI |
TypeIRegistry.buildRecordTypeFromObject(ObjectTypeI obj) |
TypeI |
FunctionTypeI.convertMethodToFunction()
Creates a new function type B based on the original function type A.
|
TypeI |
TypeIRegistry.createRecordType(Map<String,? extends TypeI> props)
Creates an anonymous structural type with the given properties.
|
TypeI |
TypeIRegistry.createTypeFromCommentNode(Node n) |
TypeI |
TypeIRegistry.createUnionType(List<? extends TypeI> variants) |
TypeI |
TypeIRegistry.evaluateTypeExpression(JSTypeExpression expr,
TypeIEnv<TypeI> typeEnv) |
TypeI |
TypeIRegistry.evaluateTypeExpressionInGlobalScope(JSTypeExpression expr) |
TypeI |
TypeI.getEnumeratedTypeOfEnumElement() |
TypeI |
ObjectTypeI.getEnumeratedTypeOfEnumObject()
If this type is an enum object, returns the declared type of the elements.
|
TypeI |
TypeI.getGreatestSubtypeWithProperty(String propName) |
TypeI |
ObjectTypeI.getLegacyResolvedType()
Only called on instances of NamedType.
|
TypeI |
ObjectTypeI.getPropertyType(String propName)
Returns the type of property propName on this object, or null if the property doesn't exist.
|
TypeI |
FunctionTypeI.getReturnType() |
TypeI |
Node.getTypeI() |
TypeI |
Node.getTypeIBeforeCast() |
TypeI |
Node.getTypeIIfOld()
Gets the OTI
JSType associated with this node if any, and null otherwise. |
TypeI |
FunctionTypeI.getTypeOfThis()
Gets the type of
this in this function. |
TypeI |
TypeIRegistry.instantiateGenericType(ObjectTypeI genericType,
com.google.common.collect.ImmutableList<? extends TypeI> typeArgs) |
TypeI |
TypeI.meetWith(TypeI other) |
TypeI |
TypeI.restrictByNotNullOrUndefined()
If this is a union type, returns a union type that does not include
the null or undefined type.
|
| Modifier and Type | Method and Description |
|---|---|
Iterable<TypeI> |
FunctionTypeI.getParameterTypes() |
com.google.common.collect.ImmutableList<? extends TypeI> |
ObjectTypeI.getTemplateTypes()
For an instantiated generic type, return the types that the type variables are mapped to.
|
Iterable<? extends TypeI> |
TypeI.getUnionMembers()
If this type is a union type, returns a list of its members.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
TypeI.isEquivalentTo(TypeI type) |
boolean |
TypeI.isSubtypeOf(TypeI type) |
boolean |
TypeI.isSubtypeWithoutStructuralTyping(TypeI type) |
TypeI |
TypeI.meetWith(TypeI other) |
void |
Node.setTypeI(TypeI type) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
FunctionTypeI.acceptsArguments(List<? extends TypeI> argumentTypes)
Checks if a call to this function with the given list of arguments is valid.
|
TypeI |
TypeIRegistry.createRecordType(Map<String,? extends TypeI> props)
Creates an anonymous structural type with the given properties.
|
TypeI |
TypeIRegistry.createUnionType(List<? extends TypeI> variants) |
TypeI |
TypeIRegistry.evaluateTypeExpression(JSTypeExpression expr,
TypeIEnv<TypeI> typeEnv) |
TypeI |
TypeIRegistry.instantiateGenericType(ObjectTypeI genericType,
com.google.common.collect.ImmutableList<? extends TypeI> typeArgs) |
| Modifier and Type | Class and Description |
|---|---|
class |
AllType
All type, representing all values.
|
class |
BooleanType
Boolean type.
|
class |
EnumElementType
The type of individual elements of an enum type
(see
EnumType). |
class |
EnumType
An enum type representing a branded collection of elements.
|
class |
FunctionType
This derived type provides extended information about a function, including
its return type and argument types.
|
class |
NamedType
A
NamedType is a named reference to some other type. |
class |
NoObjectType
The bottom Object type, representing the subclass of all objects.
|
class |
NoType
Bottom type, representing the subclass of any value or object.
|
class |
NullType
Null type.
|
class |
NumberType
Number type.
|
class |
ObjectType
Object type.
|
class |
PrototypeObjectType
The object type represents instances of JavaScript objects such as
Object, Date, Function. |
class |
ProxyObjectType
An object type which uses composition to delegate all calls.
|
class |
RecordType
A record (structural) type.
|
class |
StringType
String type.
|
class |
TemplateType |
class |
TemplatizedType
An object type with declared template types, such as
Array<string>. |
class |
UnionType
The
UnionType implements a common JavaScript idiom in which the
code is specifically designed to work with multiple input types. |
class |
UnknownType
The
Unknown type. |
class |
VoidType
Void type whose only element is the
undefined value. |
| Modifier and Type | Method and Description |
|---|---|
TypeI |
FunctionType.convertMethodToFunction() |
TypeI |
ObjectType.getEnumeratedTypeOfEnumObject() |
TypeI |
JSTypeRegistry.instantiateGenericType(ObjectTypeI genericType,
com.google.common.collect.ImmutableList<? extends TypeI> typeArgs) |
TypeI |
JSType.meetWith(TypeI that) |
| Modifier and Type | Method and Description |
|---|---|
Iterable<TypeI> |
FunctionType.getParameterTypes() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
JSType.isEquivalentTo(TypeI that)
Checks if two types are equivalent.
|
boolean |
JSType.isEquivalentTo(TypeI that,
boolean isStructural) |
boolean |
JSType.isSubtypeOf(TypeI other) |
boolean |
JSType.isSubtypeWithoutStructuralTyping(TypeI that)
the logic of this method is similar to isSubtype,
except that it does not perform structural interface matching
This function is added for disambiguate properties,
and is deprecated for the other use cases.
|
TypeI |
JSType.meetWith(TypeI that) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
FunctionType.acceptsArguments(List<? extends TypeI> argumentTypes) |
JSType |
JSTypeRegistry.createRecordType(Map<String,? extends TypeI> props) |
JSType |
JSTypeRegistry.createTypeFromCommentNode(Node n,
String sourceName,
StaticTypedScope<? extends TypeI> scope)
Creates a JSType from the nodes representing a type.
|
JSType |
JSTypeRegistry.createUnionType(List<? extends TypeI> variants) |
JSType |
JSTypeRegistry.evaluateTypeExpression(JSTypeExpression expr,
TypeIEnv<TypeI> scope) |
TypeI |
JSTypeRegistry.instantiateGenericType(ObjectTypeI genericType,
com.google.common.collect.ImmutableList<? extends TypeI> typeArgs) |
Copyright © 2009-2017 Google. All Rights Reserved.