Class KnownSymbolType
java.lang.Object
com.google.javascript.rhino.jstype.JSType
com.google.javascript.rhino.jstype.SymbolType
com.google.javascript.rhino.jstype.KnownSymbolType
A concrete instance of a JavaScript symbol.
This includes all "well-known" symbols in the spec - Symbol.iterator, Symbol.asyncIterator, etc.
This is analogous to the EnumElementType class - each KnownSymbolType is a subtype of
the general symbol type, but unique KnownSymbolTypes are not subtypes of one another.
-
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a user meaningful label for the JSType instance.getPropertyKind(Property.Key propertyName, boolean autobox) Checks whether the property is present on the object.booleanbooleanMethods inherited from class com.google.javascript.rhino.jstype.SymbolType
autoboxesTo, getPossibleToBooleanOutcomes, isSymbolValueType, matchesNumberContext, matchesObjectContext, matchesStringContext, matchesSymbolContext, testForEquality, visitMethods inherited from class com.google.javascript.rhino.jstype.JSType
areSimilar, assertFunctionType, assertObjectType, autobox, canBeCalled, canCastTo, canTestForEqualityWith, canTestForShallowEqualityWith, collapseUnion, containsReferenceAncestor, dereference, differsFrom, equals, findPropertyType, findPropertyType, findPropertyTypeWithoutConsideringTemplateTypes, getEnumeratedTypeOfEnumElement, getGreatestSubtype, getJSDocInfo, getLeastSupertype, getPropertyKind, getPropertyKind, getPropertyKind, getRestrictedTypeGivenOutcome, getTemplateParamCount, getTemplateTypeMap, getTypeParameters, getTypesUnderEquality, getTypesUnderInequality, getTypesUnderShallowEquality, getTypesUnderShallowInequality, getUnionMembers, hasAnyTemplateTypes, hashCode, hasProperty, hasProperty, isAllType, isArrayType, isBigIntObjectType, isBigIntOrNumber, isBigIntValueType, isBooleanObjectType, isBooleanValueType, isBoxableScalar, isCheckedUnknownType, isConstructor, isDateType, isDict, isEmptyType, isEnumElementType, isEnumType, isExplicitlyVoidable, isFunctionPrototypeType, isFunctionType, isGlobalThisType, isInstanceType, isInterface, isLiteralObject, isNamedType, isNativeObjectType, isNominalConstructorOrInterface, isNominalType, isNoObjectType, isNoResolvedType, isNoType, isNullable, isNullType, isNumber, isNumberObjectType, isNumberValueType, isObject, isObjectType, isOnlyBigInt, isOrdinaryFunction, isRawTypeOfTemplatizedType, isReadonlyArrayType, isRecordType, isRegexpType, isResolved, isSomeUnknownType, isString, isStringObjectType, isStringValueType, isStruct, isStructuralInterface, isStructuralType, isSubtype, isSubtype, isSubtypeOf, isSubtypeOf, isSubtypeWithoutStructuralTyping, isSuccessfullyResolved, isSymbol, isSymbolObjectType, isTemplateType, isTemplatizedType, isUnionType, isUnknownType, isUnsuccessfullyResolved, isVoidable, isVoidType, loosenTypecheckingDueToForwardReferencedSupertype, matchConstraint, mergeSupertypeTemplateTypes, resolve, restrictByNotNull, restrictByNotNullOrUndefined, restrictByNotUndefined, setValidator, toAnnotationString, toMaybeEnumElementType, toMaybeEnumType, toMaybeFunctionType, toMaybeFunctionType, toMaybeNamedType, toMaybeObjectType, toMaybeRecordType, toMaybeTemplateType, toMaybeTemplatizedType, toMaybeUnionType, toObjectType, toString
-
Constructor Details
-
KnownSymbolType
-
-
Method Details
-
getDisplayName
Description copied from class:JSTypeReturns a user meaningful label for the JSType instance. For example, Functions and Enums will return their declaration name (if they have one). Some types will not have a meaningful display name. Calls to hasDisplayName() will return true IFF getDisplayName() will return null or a zero length string.- Overrides:
getDisplayNamein classSymbolType- Returns:
- the display name of the type, or null if one is not available
-
isKnownSymbolValueType
public boolean isKnownSymbolValueType()- Overrides:
isKnownSymbolValueTypein classJSType
-
toMaybeKnownSymbolType
- Overrides:
toMaybeKnownSymbolTypein classJSType
-
hasDisplayName
public boolean hasDisplayName()- Overrides:
hasDisplayNamein classJSType- Returns:
- true if the JSType has a user meaningful label.
-
getPropertyKind
Description copied from class:JSTypeChecks whether the property is present on the object.- Overrides:
getPropertyKindin classJSType- Parameters:
propertyName- The property name.autobox- Whether to check for the presents on an autoboxed type
-