Skip to content

Commit 1003d1c

Browse files
authored
Create afterEmit.ts
1 parent 53d6f1b commit 1003d1c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import * as ts from "typescript";
2+
import * as tstl from "../../../src";
3+
4+
const plugin: tstl.Plugin = {
5+
afterEmit(program: ts.Program, options: tstl.CompilerOptions, emitHost: tstl.EmitHost, result: tstl.EmitFile[]) {
6+
void program;
7+
void options;
8+
void emitHost;
9+
10+
for (const file of result) {
11+
console.log(`File was written to disk: ${file.outputPath}`);
12+
}
13+
},
14+
};
15+
16+
// eslint-disable-next-line import/no-default-export
17+
export default plugin;

0 commit comments

Comments
 (0)