Barrel Imports Expansion Ts

/icons/calendar.svg

Last update

Jul 31, 2024

Barrel imports expansion

Description

Examples

Before

import { A, B, C } from './barrel';
function Component() {
const [name, setName] = useState < string > ('React');
}

After

import A from './barrel/A'
import B from './barrel/B'
import C from './barrel/C'
function Component() {
const [name, setName] = useState < string > ('React');
}

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now