Skip to content

Commit 7ed8289

Browse files
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]>
1 parent 1503549 commit 7ed8289

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/scripts/copy-evolution-docs.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as path from "path"
66
const sourceDir = path.resolve(process.cwd(), "../packages/evolution/docs/modules")
77
const targetDir = path.resolve(process.cwd(), "./pages/reference/modules")
88

9-
async function ensureDirectoryExists(dir) {
9+
async function ensureDirectoryExists(dir: string) {
1010
try {
1111
await fs.access(dir)
1212
} catch (error) {
@@ -15,15 +15,15 @@ async function ensureDirectoryExists(dir) {
1515
}
1616
}
1717

18-
function convertMdToMdx(content) {
18+
function convertMdToMdx(content: string) {
1919
// Convert HTML class attributes to className for React/MDX compatibility
2020
content = content.replace(/class="/g, 'className="')
2121

2222
// Just copy the files and rename them - no complex processing
2323
return content
2424
}
2525

26-
async function copyFile(src, dest) {
26+
async function copyFile(src: string, dest: string) {
2727
try {
2828
const content = await fs.readFile(src, "utf8")
2929
const convertedContent = convertMdToMdx(content)
@@ -35,7 +35,7 @@ async function copyFile(src, dest) {
3535
}
3636
}
3737

38-
async function copyDirectory(source, target) {
38+
async function copyDirectory(source: string, target: string) {
3939
await ensureDirectoryExists(target)
4040

4141
const entries = await fs.readdir(source, { withFileTypes: true })
@@ -64,7 +64,7 @@ async function copyDirectory(source, target) {
6464
}
6565
}
6666

67-
async function createMetaJson(directory) {
67+
async function createMetaJson(directory: string) {
6868
try {
6969
const entries = await fs.readdir(directory)
7070
const metaEntries = {}

0 commit comments

Comments
 (0)