

def _MarkAliasUsed(self, js_type):
    'Marks aliases in a type as used.\n\n    Recursively iterates over all subtypes in a jsdoc type annotation and\n    tracks usage of aliased symbols (which may be local variables).\n    Marks the local variable as used in the scope nearest to the current\n    scope that matches the given token.\n\n    Args:\n      js_type: The jsdoc type, a typeannotation.TypeAnnotation object.\n    '
    if js_type.alias:
        self._MarkLocalVariableUsed(js_type.identifier)
    for sub_type in js_type.IterTypes():
        self._MarkAliasUsed(sub_type)

dataset/ETHPy150Open google/closure-linter/closure_linter/javascriptlintrules.py JavaScriptLintRules._MarkAliasUsed/original