Package com.google.javascript.jscomp
Class ConformanceRules.BanUnknownDirectThisPropsReferences
java.lang.Object
com.google.javascript.jscomp.ConformanceRules.AbstractRule
com.google.javascript.jscomp.ConformanceRules.BanUnknownDirectThisPropsReferences
- All Implemented Interfaces:
CheckConformance.Rule
- Enclosing class:
ConformanceRules
public static final class ConformanceRules.BanUnknownDirectThisPropsReferences
extends ConformanceRules.AbstractRule
Banned unknown type references of the form "this.prop" unless
it is immediately cast,
it is a @template type (until template type restricts are enabled) or
the value is unused.
the "this" type is unknown (as this is expected to be used with BanUnknownThis which would
have already reported the root cause).
-
Constructor Summary
ConstructorsConstructorDescriptionBanUnknownDirectThisPropsReferences(AbstractCompiler compiler, com.google.javascript.jscomp.Requirement requirement) -
Method Summary
Modifier and TypeMethodDescriptionprotected ConformanceRules.ConformanceResultprotected booleanprotected booleanprotected static booleanprotected booleanprotected static booleanprotected static booleanprotected booleanprotected static booleanprotected booleanprotected @Nullable JSTypeMethods inherited from class com.google.javascript.jscomp.ConformanceRules.AbstractRule
check, report, tsIsAllowlistedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.javascript.jscomp.CheckConformance.Rule
getPrecondition
-
Constructor Details
-
BanUnknownDirectThisPropsReferences
public BanUnknownDirectThisPropsReferences(AbstractCompiler compiler, com.google.javascript.jscomp.Requirement requirement) throws CheckConformance.InvalidRequirementSpec
-
-
Method Details
-
checkConformance
- Specified by:
checkConformancein classConformanceRules.AbstractRule- Returns:
- Whether the code represented by the Node conforms to the rule.
-
isAllowlistedType
-
isKnown
-
isNativeObjectType
-
isTop
-
isUnknown
-
isTemplateType
-
union
-
isAssertionCall
-
isTypeImmediatelyTightened
-
isUsed
-