mirror of
https://github.com/bendtherules/ts-transformer-visualizer.git
synced 2026-08-18 13:51:48 +00:00
23 lines
469 B
TypeScript
23 lines
469 B
TypeScript
import * as ts from "typescript";
|
|
import { INIT_SOURCEFILE, UPDATE_SOURCEFILE, CLEAR_SOURCEFILE } from "./types";
|
|
|
|
export function initSourceFile(sourceFile: ts.SourceFile) {
|
|
return {
|
|
type: INIT_SOURCEFILE,
|
|
payload: { sourceFile }
|
|
};
|
|
}
|
|
|
|
export function updateSourceFile(sourceFile: ts.SourceFile) {
|
|
return {
|
|
type: UPDATE_SOURCEFILE,
|
|
payload: { sourceFile }
|
|
};
|
|
}
|
|
|
|
export function clearSourceFile() {
|
|
return {
|
|
type: CLEAR_SOURCEFILE,
|
|
};
|
|
}
|