const { join } = require('path');
const { existsSync, mkdirSync, writeFileSync } = require('fs');

const typesDir = join(__dirname, '..', '@types');
if (!existsSync(typesDir)) mkdirSync(typesDir, { recursive: true });

const stub = join(typesDir, 'index.d.ts');
if (!existsSync(stub)) {
    writeFileSync(stub, '// Auto-generated type stub\n');
}
