module.exports = function({ types: t }) {
class Foo {
constructor(name) {
this.name = name;
}
}
class State {
constructor(output, count) {
this.output = output;
this.count = count;
}
}
function init() {
return { output: "", count: 0 };
}
let state = {};
return {
visitor: {
FunctionDeclaration(path) {
const node = path.node;
if (node.return_type !== null && node.return_type !== undefined) {
const type_ann = node.return_type;
if (type_ann.type_annotation.type === "TSStringKeyword") {
return this.state.output = "string";
} else if (true) {
}
} else if (node.return_type === null || node.return_type === undefined) {
}
}
}
};
};