public static class ClosureCodingConvention.AssertFunctionByTypeName extends CodingConvention.AssertionFunctionSpec
assertedNewType, assertedType, functionName
Constructor and Description |
---|
AssertFunctionByTypeName(String functionName,
String typeName) |
Modifier and Type | Method and Description |
---|---|
JSType |
getAssertedNewType(Node call,
DeclaredTypeRegistry scope)
Returns the new type system type for a type assertion.
|
JSType |
getAssertedOldType(Node call,
JSTypeRegistry registry)
Returns the old type system type for a type assertion, or null if
the function asserts that the node must not be null or undefined.
|
getAssertedParam, getFunctionName
public JSType getAssertedOldType(Node call, JSTypeRegistry registry)
CodingConvention.AssertionFunctionSpec
getAssertedOldType
in class CodingConvention.AssertionFunctionSpec
call
- The asserting callpublic JSType getAssertedNewType(Node call, DeclaredTypeRegistry scope)
CodingConvention.AssertionFunctionSpec
getAssertedNewType
in class CodingConvention.AssertionFunctionSpec
call
- The asserting callCopyright © 2009–2023 Google. All rights reserved.