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
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 }.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.javascript.rhino.jstype.JSType
JSType.HasPropertyKind, JSType.Nullability, JSType.SubtypingMode, JSType.TypePair, JSType.WithSourceRef -
Field Summary
Fields inherited from class com.google.javascript.rhino.jstype.JSType
templateTypeMap -
Method Summary
Modifier and TypeMethodDescriptionGets the implicit prototype (a.k.a.booleanDowncasts 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, setPropertyJSDocInfo, setPropertyNodeMethods inherited from class com.google.javascript.rhino.jstype.ObjectType
cast, clearCachedValues, createDelegateSuffix, defineDeclaredProperty, defineDeclaredProperty, defineInferredProperty, defineInferredProperty, defineSynthesizedProperty, findClosestDefinition, findClosestDefinition, findPropertyTypeWithoutConsideringTemplateTypes, getAllKeys, getClosestDefiningType, getDisplayName, getEnumeratedTypeOfEnumObject, getImplicitPrototypeChain, getJSDocInfo, getNormalizedReferenceName, getOwnPropertyDefSite, getOwnPropertyDefSite, getOwnPropertyJSDocInfo, getOwnPropertyJSDocInfo, getOwnPropertyKeys, getOwnPropertyKind, getOwnPropertyKind, getOwnPropertyKnownSymbols, getOwnPropertyNames, getOwnSlot, getOwnSlot, getPossibleToBooleanOutcomes, getPropertiesCount, getPropertyDefSite, getPropertyDefSite, getPropertyJSDocInfo, getPropertyJSDocInfo, getPropertyKind, getPropertyNames, getPropertyNode, getPropertyNode, getPropertyType, getPropertyType, getPropertyTypeMap, getRawType, getSlot, getSlot, getSuperClassConstructor, getTemplateTypes, getTypeOfThis, hasCachedValues, hasOwnDeclaredProperty, hasOwnDeclaredProperty, hasOwnProperty, hasOwnProperty, hasReferenceName, isFunctionPrototypeType, isObject, isPropertyInExterns, isPropertyTypeDeclared, isPropertyTypeDeclared, isPropertyTypeInferred, isPropertyTypeInferred, isUnknownType, setJSDocInfo, setPropertyJSDocInfo, setPropertyNode, testForEquality, visitMethods inherited from class com.google.javascript.rhino.jstype.JSType
areSimilar, assertFunctionType, assertObjectType, autobox, autoboxesTo, canBeCalled, canCastTo, canTestForEqualityWith, canTestForShallowEqualityWith, collapseUnion, containsReferenceAncestor, dereference, differsFrom, equals, findPropertyType, findPropertyType, getEnumeratedTypeOfEnumElement, getGreatestSubtype, getLeastSupertype, getPropertyKind, getPropertyKind, getPropertyKind, getRestrictedTypeGivenOutcome, getTemplateTypeMap, getTypeParameters, getTypesUnderEquality, getTypesUnderInequality, getTypesUnderShallowEquality, getTypesUnderShallowInequality, getUnionMembers, hasAnyTemplateTypes, hasDisplayName, hashCode, hasProperty, hasProperty, isAllType, isArrayType, isBigIntObjectType, isBigIntOrNumber, isBigIntValueType, isBooleanObjectType, isBooleanValueType, isBoxableScalar, isCheckedUnknownType, isConstructor, isDateType, isDict, isEmptyType, isEnumElementType, isEnumType, isExplicitlyVoidable, isFunctionType, isGlobalThisType, isInstanceType, isInterface, isKnownSymbolValueType, isLiteralObject, isNamedType, isNominalConstructorOrInterface, isNominalType, isNoObjectType, isNoResolvedType, isNoType, isNullable, isNullType, isNumber, isNumberObjectType, isNumberValueType, isObjectType, isOnlyBigInt, isOrdinaryFunction, isRawTypeOfTemplatizedType, isReadonlyArrayType, isRecordType, isRegexpType, isResolved, isSomeUnknownType, isString, isStringObjectType, isStringValueType, isStruct, isStructuralInterface, isSubtype, isSubtype, isSubtypeOf, isSubtypeOf, isSubtypeWithoutStructuralTyping, isSuccessfullyResolved, isSymbol, isSymbolObjectType, isSymbolValueType, isTemplateType, isTemplatizedType, isUnionType, isUnsuccessfullyResolved, isVoidable, isVoidType, loosenTypecheckingDueToForwardReferencedSupertype, mergeSupertypeTemplateTypes, resolve, restrictByNotNull, restrictByNotNullOrUndefined, restrictByNotUndefined, setValidator, toAnnotationString, toMaybeEnumElementType, toMaybeEnumType, toMaybeFunctionType, toMaybeFunctionType, toMaybeKnownSymbolType, toMaybeNamedType, toMaybeObjectType, toMaybeTemplateType, toMaybeTemplatizedType, toMaybeUnionType, toObjectType, toString
-
Method Details
-
getImplicitPrototype
Description copied from class:ObjectTypeGets the implicit prototype (a.k.a. the[[Prototype]]property).- Overrides:
getImplicitPrototypein classPrototypeObjectType
-
toMaybeRecordType
Description copied from class:JSTypeDowncasts this to a RecordType, or returns null if this is not a RecordType.- Overrides:
toMaybeRecordTypein classJSType
-
isStructuralType
public boolean isStructuralType()- Overrides:
isStructuralTypein classObjectType
-