acaba ai refactor'u 1 dakikaya indirebilir mi
AI + TS-morph ile Telegram botumu 1 dakikada refactor ettim. Function taşıma, rename, import güncellemesi—hepsi otomatik. VS Code bile yetişemedi.
Son güncelleme
Bu yararlı oldu mu?
Bu yararlı oldu mu?
Sen: "ts-morph kullan, X'i Y'ye taşı, tüm referansları güncelle"
AI: script yazar → çalıştırır → git diff ile verify eder
Sen: değişiklikleri review et veya rollback yapimport { Project } from 'ts-morph'
const project = new Project({ tsConfigFilePath: './tsconfig.json' })
// Kaynak dosyayı bul
const sourceFile = project.getSourceFile('src/features/text.ts')
const targetFile = project.getSourceFile('src/actions/save-text.ts')
// Function'ı taşı
const fn = sourceFile.getFunction('compressFromTelegram')
fn.moveTo(targetFile)
// Tüm referanslar otomatik güncellenir
project.save()**MANDATORY: Write tool + bun for TypeScript discovery**
Write to `/tmp/attention-discover-{domain}-{keyword}-{uid}.ts` + run with `bun` (we have A LOT tmp/scripts so NEVER use short names)
- Use `ts-morph` for analysis (tsconfig required for path aliases)
- File Imports (dependencies IN)
- Importers (dependents OUT)
- Exports (API surface)
- All Identifiers (params, vars, calls, props)