public class RecordType extends PrototypeObjectType
JSType.TypePair
EMPTY_TYPE_COMPONENT, ENUMDECL, NOT_A_CLASS, NOT_A_TYPE, NOT_ENUMDECL, templateTypeMap, UNKNOWN_NAME
Modifier and Type | Method and Description |
---|---|
ObjectType |
getImplicitPrototype()
Gets the implicit prototype (a.k.a.
|
boolean |
isSubtype(JSType that)
Checks whether
this is a subtype of that . |
RecordType |
toMaybeRecordType()
Downcasts this to a RecordType, or returns null if this is not
a RecordType.
|
canBeCalled, getConstructor, getCtorExtendedInterfaces, getCtorImplementedInterfaces, getOwnerFunction, getReferenceName, hasCachedValues, hasReferenceName, isAnonymous, isNativeObjectType, matchConstraint, matchesNumberContext, matchesObjectContext, matchesStringContext, matchRecordTypeConstraint, removeProperty, setPropertyJSDocInfo, unboxesTo
cast, clearCachedValues, createDelegateSuffix, defineDeclaredProperty, defineInferredProperty, defineSynthesizedProperty, findPropertyType, getDisplayName, getJSDocInfo, getNormalizedReferenceName, getOwnPropertyJSDocInfo, getOwnPropertyNames, getOwnSlot, getParentScope, getPossibleToBooleanOutcomes, getPropertiesCount, getPropertyNames, getPropertyNode, getPropertyType, getRootNode, getSlot, getTemplateTypes, getTypeOfThis, hasOwnProperty, hasProperty, isFunctionPrototypeType, isObject, isPropertyInExterns, isPropertyTypeDeclared, isPropertyTypeInferred, isUnknownType, setJSDocInfo, testForEquality, visit
autobox, autoboxesTo, canCastTo, canTestForEqualityWith, canTestForShallowEqualityWith, clearResolved, collapseUnion, dereference, differsFrom, equals, extendTemplateTypeMap, getGreatestSubtype, getLeastSupertype, getRestrictedTypeGivenToBooleanOutcome, getTemplateTypeMap, getTypesUnderEquality, getTypesUnderInequality, getTypesUnderShallowEquality, getTypesUnderShallowInequality, hasAnyTemplateTypes, hasDisplayName, hashCode, isAllType, isArrayType, isBooleanObjectType, isBooleanValueType, isCheckedUnknownType, isConstructor, isDateType, isDict, isEmptyType, isEnumElementType, isEnumType, isEquivalent, isEquivalentTo, isFunctionType, isGlobalThisType, isInstanceType, isInterface, isInvariant, isNominalConstructor, isNominalType, isNoObjectType, isNoResolvedType, isNoType, isNullable, isNullType, isNumber, isNumberObjectType, isNumberValueType, isOrdinaryFunction, isRecordType, isRegexpType, isResolved, isString, isStringObjectType, isStringValueType, isStruct, isTemplateType, isTemplatizedType, isUnionType, isVoidType, matchesInt32Context, matchesUint32Context, resolve, restrictByNotNullOrUndefined, setValidator, toAnnotationString, toDebugHashCodeString, toMaybeEnumElementType, toMaybeEnumType, toMaybeFunctionType, toMaybeFunctionType, toMaybeTemplateType, toMaybeTemplateType, toMaybeTemplatizedType, toMaybeTemplatizedType, toMaybeUnionType, toObjectType, toString
public ObjectType getImplicitPrototype()
ObjectType
[[Prototype]]
property).getImplicitPrototype
in class PrototypeObjectType
public RecordType toMaybeRecordType()
JSType
toMaybeRecordType
in class JSType
public boolean isSubtype(JSType that)
JSType
this
is a subtype of that
.Subtyping rules:
(T<sub>1</sub>, …, T<sub>n</sub>) <: U
if and only
T<sub>k</sub> <: U
for all k ∈ 1..n
.U <: (T<sub>1</sub>, …, T<sub>n</sub>)
if and only
if U <: T<sub>k</sub>
for some index k
.O<sub>1</sub>
is a subtype
of an object O<sub>2</sub>
if it has more properties
than O<sub>2</sub>
and all common properties are
pairwise subtypes.isSubtype
in class PrototypeObjectType
this <: that
Copyright © 2009–2017 Google. All rights reserved.