Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
com.google.javascript.jscomp.newtypes |
Modifier and Type | Field and Description |
---|---|
protected JSType |
CodingConvention.AssertionFunctionSpec.assertedNewType |
Modifier and Type | Method and Description |
---|---|
JSType |
ClosureCodingConvention.AssertInstanceofSpec.getAssertedNewType(Node call,
DeclaredTypeRegistry scope) |
JSType |
ClosureCodingConvention.AssertFunctionByTypeName.getAssertedNewType(Node call,
DeclaredTypeRegistry scope) |
JSType |
CodingConvention.AssertionFunctionSpec.getAssertedNewType(Node call,
DeclaredTypeRegistry scope)
Returns the new type system type for a type assertion.
|
Modifier and Type | Method and Description |
---|---|
void |
ClosureCodingConvention.applySingletonGetterNew(RawNominalType rawType,
JSType getInstanceType,
JSType instanceType) |
void |
CodingConvention.applySingletonGetterNew(RawNominalType rawType,
JSType getInstanceType,
JSType instanceType) |
void |
CodingConventions.Proxy.applySingletonGetterNew(RawNominalType rawType,
JSType getInstanceType,
JSType instanceType) |
Constructor and Description |
---|
AssertionFunctionSpec(String functionName,
JSType assertedNewType) |
AssertionFunctionSpec(String functionName,
JSType assertedNewType,
JSTypeNative assertedType) |
Modifier and Type | Field and Description |
---|---|
static JSType |
JSType.BOOLEAN |
static JSType |
JSType.BOTTOM |
static JSType |
JSType.FALSE_TYPE |
static JSType |
JSType.FALSY |
protected JSType |
Namespace.namespaceType |
static JSType |
JSType.NULL |
static JSType |
JSType.NULL_OR_UNDEF |
static JSType |
JSType.NUM_OR_STR |
static JSType |
JSType.NUMBER |
JSType |
JSTypeCreatorFromJSDoc.FunctionAndSlotType.slotType |
static JSType |
JSType.STRING |
static JSType |
JSType.TOP |
static JSType |
JSType.TOP_DICT |
static JSType |
JSType.TOP_OBJECT |
static JSType |
JSType.TOP_SCALAR |
static JSType |
JSType.TOP_STRUCT |
static JSType |
JSType.TRUE_TYPE |
static JSType |
JSType.TRUTHY |
static JSType |
JSType.UNDEFINED |
static JSType |
JSType.UNKNOWN |
Modifier and Type | Method and Description |
---|---|
JSType |
JSType.autobox() |
protected JSType |
RawNominalType.computeJSType(JSTypes commonTypes) |
protected JSType |
NamespaceLit.computeJSType(JSTypes commonTypes) |
protected abstract JSType |
Namespace.computeJSType(JSTypes commonTypes) |
protected JSType |
EnumType.computeJSType(JSTypes commonTypes)
When defining an enum such as
/** @enum {number} * /
var X = { ONE: 1, TWO: 2 };
the properties of the object literal are constant.
|
protected JSType |
FunctionNamespace.computeJSType(JSTypes commonTypes) |
JSType |
JSTypes.fromFunctionType(FunctionType fn) |
static JSType |
JSType.fromObjectType(com.google.javascript.jscomp.newtypes.ObjectType obj) |
static JSType |
JSType.fromTypeVar(String typevarName) |
JSType |
JSTypes.getArgumentsArrayType() |
JSType |
JSTypes.getArgumentsArrayType(JSType t) |
JSType |
JSTypes.getArrayInstance() |
JSType |
JSTypes.getArrayInstance(JSType t) |
JSType |
RawNominalType.getCtorPropDeclaredType(String pname) |
JSType |
EnumType.getDeclaredProp(QualifiedName qname) |
JSType |
JSType.getDeclaredProp(QualifiedName qname) |
JSType |
DeclaredTypeRegistry.getDeclaredTypeOf(String name)
Returns the declared JSType of the given identifier,
or null if the identifier is not defined.
|
JSType |
JSTypeCreatorFromJSDoc.getDeclaredTypeOfNode(JSDocInfo jsdoc,
RawNominalType ownerType,
DeclaredTypeRegistry registry) |
JSType |
EnumType.getEnumeratedType() |
JSType |
JSType.getEnumeratedType() |
JSType |
DeclaredFunctionType.getFormalType(int argpos) |
JSType |
FunctionType.getFormalType(int argpos) |
JSType |
JSType.getIndexedType() |
JSType |
JSType.getIndexType() |
JSType |
RawNominalType.getInstanceAsJSType() |
JSType |
NominalType.getInstanceAsJSType() |
JSType |
RawNominalType.getInstancePropDeclaredType(String pname) |
JSType |
FunctionType.getInstanceTypeOfCtor() |
JSType |
RawNominalType.getInstanceWithNullability(boolean includeNull) |
JSType |
DeclaredFunctionType.getNominalType() |
JSType |
FunctionType.getOuterVarPrecondition(String name) |
JSType |
EnumType.getProp(QualifiedName qname) |
JSType |
JSType.getProp(QualifiedName qname) |
JSType |
NominalType.getPropDeclaredType(String pname) |
JSType |
Namespace.getPropDeclaredType(String pname) |
JSType |
EnumType.getPropType() |
JSType |
NominalType.getPrototype() |
JSType |
DeclaredFunctionType.getReceiverType() |
JSType |
JSTypes.getRegexpType() |
JSType |
DeclaredFunctionType.getRestFormalsType() |
JSType |
FunctionType.getRestFormalsType() |
JSType |
DeclaredFunctionType.getReturnType() |
JSType |
FunctionType.getReturnType() |
JSType |
FunctionType.getSuperPrototype() |
JSType |
DeclaredFunctionType.getThisType() |
JSType |
FunctionType.getThisType() |
JSType |
Typedef.getType() |
JSType |
TypeEnv.getType(String n) |
JSType |
Declaration.getTypeOfSimpleDecl() |
static JSType |
JSType.join(JSType lhs,
JSType rhs) |
JSType |
JSTypes.looseTopFunction() |
JSType |
JSTypeCreatorFromJSDoc.maybeMakeNullable(JSType t) |
static JSType |
JSType.meet(JSType lhs,
JSType rhs) |
JSType |
JSType.negate() |
static JSType |
JSType.plus(JSType lhs,
JSType rhs) |
JSType |
JSTypes.qmarkFunction() |
JSType |
JSType.removeType(JSType other) |
JSType |
JSType.specialize(JSType other) |
JSType |
JSType.substituteGenerics(Map<String,JSType> concreteTypes) |
JSType |
JSType.substituteGenericsWithUnknown() |
JSType |
JSType.toBoolean() |
JSType |
Namespace.toJSType(JSTypes commonTypes) |
JSType |
JSTypes.topFunction() |
JSType |
JSType.withDeclaredProperty(QualifiedName qname,
JSType type,
boolean isConstant) |
JSType |
JSType.withFunction(FunctionType ft,
NominalType fnNominal) |
JSType |
JSType.withLoose()
Turns the class-less object of this type (if any) into a loose object
|
JSType |
JSType.withoutProperty(QualifiedName qname) |
JSType |
JSType.withProperty(QualifiedName qname,
JSType type) |
JSType |
JSType.withPropertyRequired(String pname) |
Modifier and Type | Method and Description |
---|---|
void |
RawNominalType.addClassProperty(String pname,
Node defSite,
JSType type,
boolean isConstant)
Add a new non-optional declared property to instances of this class
|
void |
RawNominalType.addCtorProperty(String pname,
Node defSite,
JSType type,
boolean isConstant)
Add a new non-optional declared property to this class's constructor
|
FunctionTypeBuilder |
FunctionTypeBuilder.addNominalType(JSType t) |
FunctionTypeBuilder |
FunctionTypeBuilder.addOptFormal(JSType t) |
FunctionTypeBuilder |
FunctionTypeBuilder.addOuterVarPrecondition(String name,
JSType t) |
void |
Namespace.addProperty(String pname,
Node defSite,
JSType type,
boolean isConstant)
Add a new non-optional declared property to this namespace
|
void |
RawNominalType.addPropertyWhichMayNotBeOnAllInstances(String pname,
JSType type) |
void |
RawNominalType.addProtoProperty(String pname,
Node defSite,
JSType type,
boolean isConstant)
Add a new declared prototype property to this class
|
FunctionTypeBuilder |
FunctionTypeBuilder.addReceiverType(JSType t) |
FunctionTypeBuilder |
FunctionTypeBuilder.addReqFormal(JSType t) |
FunctionTypeBuilder |
FunctionTypeBuilder.addRestFormals(JSType t) |
FunctionTypeBuilder |
FunctionTypeBuilder.addRetType(JSType t) |
void |
RawNominalType.addUndeclaredClassProperty(String pname,
JSType type,
Node defSite)
Add a new undeclared property to instances of this class
|
void |
Namespace.addUndeclaredProperty(String pname,
Node defSite,
JSType t,
boolean isConstant)
Add a new undeclared property to this namespace
|
JSType |
JSTypes.getArgumentsArrayType(JSType t) |
JSType |
JSTypes.getArrayInstance(JSType t) |
static boolean |
JSType.haveCommonSubtype(JSType lhs,
JSType rhs) |
boolean |
JSType.isNonLooseSubtypeOf(JSType other) |
boolean |
JSTypes.isNumberScalarOrObj(JSType t) |
boolean |
JSTypes.isNumStrScalarOrObj(JSType t) |
boolean |
JSTypes.isStringScalarOrObj(JSType t) |
static JSType |
JSType.join(JSType lhs,
JSType rhs) |
JSType |
JSTypeCreatorFromJSDoc.maybeMakeNullable(JSType t) |
void |
NamespaceLit.maybeSetWindowInstance(JSType obj) |
static JSType |
JSType.meet(JSType lhs,
JSType rhs) |
static JSType |
JSType.plus(JSType lhs,
JSType rhs) |
TypeEnv |
TypeEnv.putType(String n,
JSType t) |
JSType |
JSType.removeType(JSType other) |
void |
JSTypes.setBooleanInstance(JSType t) |
void |
JSTypes.setNumberInstance(JSType t) |
void |
JSTypes.setRegexpInstance(JSType regexpInstance) |
void |
JSTypes.setStringInstance(JSType t) |
JSType |
JSType.specialize(JSType other) |
boolean |
JSType.unifyWith(JSType other,
List<String> typeParameters,
com.google.common.collect.Multimap<String,JSType> typeMultimap)
Unify
this , which may contain free type variables,
with other , a concrete subtype, modifying the supplied
typeMultimap to add any new template variable type bindings. |
JSType |
JSType.withDeclaredProperty(QualifiedName qname,
JSType type,
boolean isConstant) |
JSType |
JSType.withProperty(QualifiedName qname,
JSType type) |
DeclaredFunctionType |
DeclaredFunctionType.withReceiverType(JSType newReceiverType) |
Modifier and Type | Method and Description |
---|---|
FunctionType |
FunctionType.instantiateGenerics(Map<String,JSType> typeMap) |
FunctionType |
FunctionType.instantiateGenericsFromArgumentTypes(List<JSType> argTypes) |
JSType |
JSType.substituteGenerics(Map<String,JSType> concreteTypes) |
boolean |
JSType.unifyWith(JSType other,
List<String> typeParameters,
com.google.common.collect.Multimap<String,JSType> typeMultimap)
Unify
this , which may contain free type variables,
with other , a concrete subtype, modifying the supplied
typeMultimap to add any new template variable type bindings. |
Constructor and Description |
---|
Declaration(JSType simpleType,
Typedef typedef,
Namespace ns,
DeclaredTypeRegistry funScope,
boolean isTypeVar,
boolean isConstant) |
FunctionAndSlotType(JSType slotType,
DeclaredFunctionType functionType) |
Copyright © 2009–2023 Google. All rights reserved.