Skip to content

Commit

Permalink
Ignore export line in type declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
BradyMitch committed Jun 4, 2024
1 parent a61ebb6 commit 2e58c17
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/helpers/techdocs/update-typescript-types.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ fs.readFile(declarationFilePath, 'utf8', (error, declarationData) => {
return;
}

// Extract types from the declaration file
const typeDefinitions = extractTypeDefinitions(declarationData);
// Remove export lines
const filteredDeclarationData = declarationData
.split('\n')
.filter((line) => !line.startsWith('export '))
.join('\n');

// Extract types from the filtered declaration file
const typeDefinitions = extractTypeDefinitions(filteredDeclarationData);

// Recursively process markdown files
processMarkdownFiles(docsDirectoryPath, typeDefinitions);
Expand Down

0 comments on commit 2e58c17

Please sign in to comment.