Skip to content

Commit 475c8e5

Browse files
committed
fix: ReplaceVariables
1 parent cb58bcb commit 475c8e5

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/Utils/StringUtils.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ export function TitleCase(string: string): string {
1010
}
1111

1212
// Credit - https://github.com/DuckySoLucky/hypixel-discord-chat-bridge/blob/d3ea84a26ebf094c8191d50b4954549e2dd4dc7f/src/contracts/helperFunctions.js#L216-L225
13-
export function ReplaceVariables(template: string, variables: object): string {
14-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
15-
// @ts-expect-error
13+
export default function ReplaceVariables(template: string, variables: { [x: string]: string }) {
1614
return template.replace(/\{(\w+)\}/g, (match, name) => variables[name] ?? match);
1715
}

0 commit comments

Comments
 (0)