Skip to content

Commit 8ac774e

Browse files
committed
Fix plugin examples
1 parent 775c752 commit 8ac774e

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

docs/api/plugins.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ import * as ts from "typescript";
120120
import * as tstl from "typescript-to-lua";
121121

122122
class Plugin implements tstl.Plugin {
123-
public beforeTransform(program: ts.Program, options: tstl.CompilerOptions, emitHost: EmitHost) {
124-
console.log("starting transformation of program", program, "with options", options);
123+
public beforeTransform(program: ts.Program, options: tstl.CompilerOptions, emitHost: tstl.EmitHost) {
124+
console.log("Starting transformation of program", program, "with options", options);
125125
}
126126
}
127127

@@ -138,9 +138,14 @@ import * as ts from "typescript";
138138
import * as tstl from "typescript-to-lua";
139139

140140
const plugin: tstl.Plugin = {
141-
afterPrint(program: ts.Program, options: tstl.CompilerOptions, emitHost: EmitHost, result: tstl.ProcessedFile[]) {
141+
afterPrint(
142+
program: ts.Program,
143+
options: tstl.CompilerOptions,
144+
emitHost: tstl.EmitHost,
145+
result: tstl.ProcessedFile[],
146+
) {
142147
for (const file of result) {
143-
file.code = "-- Commented added by afterPrint plugin\n" + file.code;
148+
file.code = "-- Comment added by afterPrint plugin\n" + file.code;
144149
}
145150
},
146151
};

0 commit comments

Comments
 (0)