Stay organized with collections Save and categorize content based on your preferences.

blockly > Generator > finish

Generator.finish() method

Hook for code to run at end of code generation. Subclasses may override this, e.g. to prepend the generated code with import statements or variable definitions.

Signature:

finish(code: string): string;

Parameters

Parameter Type Description
code string Generated code.

Returns:

string

Completed code.