Open History to see the last commit
1// @ts-check
2β
3// https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/MissingExportEquals.md
4β
5import fs from 'node:fs/promises'
6import path from 'node:path'
7β
8const projectDir = new URL('..', import.meta.url).pathname
9β
10const dtsFiles = [
11 path.join(projectDir, 'dist/index.d.ts'),
12 path.join(projectDir, 'dist/index.d.cts'),
13]
14β
15for (const file of dtsFiles) {
16 await fs.appendFile(file, '\n\nexport = plugin')
17 console.log(
18 `Appended \`export = plugin\` to ${path.relative(projectDir, file)}`,
19 )
20}