Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodrigo Cesar committed Jun 6, 2024
1 parent fd9ebbd commit 86e47eb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ const createConverter = config => {
} else {
rows.push(`export enum ${enum_.Identifier} {`);

entries.forEach(([key, entrie]) => {
if (entrie.Obsolete) {
rows.push(formatObsoleteMessage(entrie.ObsoleteMessage, ' '));
entries.forEach(([key, entry]) => {
if (entry.Obsolete) {
rows.push(formatObsoleteMessage(entry.ObsoleteMessage, ' '));
}
if (config.numericEnums) {
if (entrie.Value == null) {
if (entry.Value == null) {
rows.push(` ${key},`);
} else {
rows.push(` ${key} = ${entrie.Value},`);
rows.push(` ${key} = ${entry.Value},`);
}
} else {
rows.push(` ${key} = '${getEnumStringValue(key)}',`);
Expand All @@ -144,17 +144,17 @@ const createConverter = config => {
return rows;
};

const formatObsoleteMessage = (obsoleteMessage, identation) => {
const formatObsoleteMessage = (obsoleteMessage, indentation) => {
if (obsoleteMessage) {
obsoleteMessage = ' ' + obsoleteMessage;
} else {
obsoleteMessage = '';
}

let deprecationMessage = '';
deprecationMessage += `${identation}/**\n`;
deprecationMessage += `${identation} * @deprecated${obsoleteMessage}\n`;
deprecationMessage += `${identation} */`;
deprecationMessage += `${indentation}/**\n`;
deprecationMessage += `${indentation} * @deprecated${obsoleteMessage}\n`;
deprecationMessage += `${indentation} */`;

return deprecationMessage;
}
Expand Down

0 comments on commit 86e47eb

Please sign in to comment.