Class RecordType
- java.lang.Object
-
- com.google.javascript.rhino.jstype.JSType
-
- com.google.javascript.rhino.jstype.ObjectType
-
- com.google.javascript.rhino.jstype.PrototypeObjectType
-
- com.google.javascript.rhino.jstype.RecordType
-
- All Implemented Interfaces:
java.io.Serializable
public class RecordType extends PrototypeObjectType
A record (structural) type. Subtyping: The subtyping of a record type is defined via structural comparison of a record type's properties. For example, a record type of the form { a : TYPE_1 } is a supertype of a record type of the form { b : TYPE_2, a : TYPE_1 } because B can be assigned to A and matches all constraints. Similarly, a defined type can be assigned to a record type so long as that defined type matches all property constraints of the record type. A record type of the form { a : A, b : B } can be assigned to a record of type { a : A }.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.javascript.rhino.jstype.JSType
JSType.HasPropertyKind, JSType.Nullability, JSType.SubtypingMode, JSType.TypePair
-
-
Field Summary
-
Fields inherited from class com.google.javascript.rhino.jstype.JSType
templateTypeMap
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectType
getImplicitPrototype()
Gets the implicit prototype (a.k.a.boolean
isStructuralType()
RecordType
toMaybeRecordType()
Downcasts this to a RecordType, or returns null if this is not a RecordType.-
Methods inherited from class com.google.javascript.rhino.jstype.PrototypeObjectType
getConstructor, getCtorExtendedInterfaces, getCtorImplementedInterfaces, getOwnerFunction, getReferenceName, getTemplateParamCount, isAnonymous, isNativeObjectType, matchConstraint, matchesNumberContext, matchesObjectContext, matchesStringContext, matchesSymbolContext, matchRecordTypeConstraint, removeProperty, setPropertyJSDocInfo, setPropertyNode, unboxesTo
-
Methods inherited from class com.google.javascript.rhino.jstype.ObjectType
cast, clearCachedValues, createDelegateSuffix, defineDeclaredProperty, defineInferredProperty, defineSynthesizedProperty, findClosestDefinition, findPropertyTypeWithoutConsideringTemplateTypes, getClosestDefiningType, getDisplayName, getEnumeratedTypeOfEnumObject, getImplicitPrototypeChain, getJSDocInfo, getNormalizedReferenceName, getOwnPropertyDefSite, getOwnPropertyJSDocInfo, getOwnPropertyKind, getOwnPropertyNames, getOwnSlot, getPossibleToBooleanOutcomes, getPropertiesCount, getPropertyDefSite, getPropertyJSDocInfo, getPropertyKind, getPropertyNames, getPropertyNode, getPropertyType, getPropertyTypeMap, getRawType, getSlot, getSuperClassConstructor, getTemplateTypes, getTopMostDefiningType, getTypeOfThis, hasCachedValues, hasOwnProperty, hasReferenceName, isAmbiguousObject, isFunctionPrototypeType, isObject, isPropertyInExterns, isPropertyTypeDeclared, isPropertyTypeInferred, isUnknownType, setJSDocInfo, testForEquality, visit
-
Methods inherited from class com.google.javascript.rhino.jstype.JSType
areIdentical, assertFunctionType, assertObjectType, autobox, autoboxesTo, canBeCalled, canCastTo, canTestForEqualityWith, canTestForShallowEqualityWith, collapseUnion, containsReferenceAncestor, dereference, differsFrom, equals, findPropertyType, getEnumeratedTypeOfEnumElement, getGreatestSubtype, getGreatestSubtypeWithProperty, getLeastSupertype, getPropertyKind, getRestrictedTypeGivenOutcome, getTemplateTypeMap, getTypeParameters, getTypesUnderEquality, getTypesUnderInequality, getTypesUnderShallowEquality, getTypesUnderShallowInequality, getUnionMembers, hasAnyTemplateTypes, hasDisplayName, hashCode, hasProperty, isAllType, isArrayType, isBigIntObjectType, isBigIntOrNumber, isBigIntValueType, isBooleanObjectType, isBooleanValueType, isBoxableScalar, isCheckedUnknownType, isConstructor, isDateType, isDict, isEmptyType, isEnumElementType, isEnumType, isExplicitlyVoidable, isFunctionType, isGlobalThisType, isInstanceType, isInterface, isLiteralObject, isNamedType, isNominalConstructor, isNominalType, isNoObjectType, isNoResolvedType, isNoType, isNullable, isNullType, isNumber, isNumberObjectType, isNumberValueType, isObjectType, isOnlyBigInt, isOrdinaryFunction, isRawTypeOfTemplatizedType, isRecordType, isRegexpType, isResolved, isSomeUnknownType, isString, isStringObjectType, isStringValueType, isStruct, isStructuralInterface, isSubtype, isSubtype, isSubtypeOf, isSubtypeOf, isSubtypeWithoutStructuralTyping, isSuccessfullyResolved, isSymbol, isSymbolObjectType, isSymbolValueType, isTemplateType, isTemplatizedType, isUnionType, isUnresolved, isUnresolvedOrResolvedUnknown, isUnsuccessfullyResolved, isVoidable, isVoidType, loosenTypecheckingDueToForwardReferencedSupertype, mergeSupertypeTemplateTypes, resolve, restrictByNotNull, restrictByNotNullOrUndefined, restrictByNotUndefined, setValidator, toAnnotationString, toMaybeEnumElementType, toMaybeEnumType, toMaybeFunctionType, toMaybeFunctionType, toMaybeNamedType, toMaybeObjectType, toMaybeTemplateType, toMaybeTemplatizedType, toMaybeUnionType, toObjectType, toString
-
-
-
-
Method Detail
-
getImplicitPrototype
public ObjectType getImplicitPrototype()
Description copied from class:ObjectType
Gets the implicit prototype (a.k.a. the[[Prototype]]
property).- Overrides:
getImplicitPrototype
in classPrototypeObjectType
-
toMaybeRecordType
public RecordType toMaybeRecordType()
Description copied from class:JSType
Downcasts this to a RecordType, or returns null if this is not a RecordType.- Overrides:
toMaybeRecordType
in classJSType
-
isStructuralType
public boolean isStructuralType()
- Overrides:
isStructuralType
in classObjectType
-
-