tools/json_schema_compiler/js_util.py
def _ReturnsAsyncToJsFunction(self, namespace_name, returns_async):
    """Converts a model.ReturnsAsync to a JS function equivalent"""
    # TODO(https://crbug.com/1142991) update this to generate promise-based
    # types and show that as a return from the API function itself, rather than
    # appended to the params as a callback.
    c = Code()
    c.Append('function(')
    c.Concat(
        self._FunctionParamsToJsParams(namespace_name, returns_async.params),
        new_line=False)
    c.Append('): ', new_line=False, strip_right=False)

    c.Append('void', new_line=False)
    return c
Converts a model.ReturnsAsync to a JS function equivalent
Converts a model.ReturnsAsync to a JS function equivalent
Converts a model . ReturnsAsync to a JS function equivalent
def _ReturnsAsyncToJsFunction(self, namespace_name, returns_async):
    c = Code()
    c.Append('function(')
    c.Concat(
        self._FunctionParamsToJsParams(namespace_name, returns_async.params),
        new_line=False)
    c.Append('): ', new_line=False, strip_right=False)
    c.Append('void', new_line=False)
    return c
def _ReturnsAsyncToJsFunction ( self , namespace_name , returns_async ) : c = Code ( ) c . Append ( 'function(' ) c . Concat ( self . _FunctionParamsToJsParams ( namespace_name , returns_async . params ) , new_line = False ) c . Append ( '): ' , new_line = False , strip_right = False ) c . Append ( 'void' , new_line = False ) return c
Converts a model.ReturnsAsync to a JS function equivalent
Converts a model . ReturnsAsync to a JS function equivalent
"""Converts a model.ReturnsAsync to a JS function equivalent""" # TODO(https://crbug.com/1142991) update this to generate promise-based # types and show that as a return from the API function itself, rather than # appended to the params as a callback.
self
namespace_name
returns_async