Skip to main content

blockly > CodeGenerator > finish

CodeGenerator.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.