Skip to content

Instantly share code, notes, and snippets.

@thecodegoddess
thecodegoddess / transform.js
Created January 7, 2023 10:34 — forked from jbrown215/transform.js
Flow exact-by-default jscodeshift transform
module.exports = function transformer(file, api) {
const j = api.jscodeshift;
const root = j(file.source);
root
.find(j.ObjectTypeAnnotation, {inexact: false, exact: false})
.forEach(path => {
path.node.inexact = true;
});
return root.toSource();