We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb58bcb commit 475c8e5Copy full SHA for 475c8e5
1 file changed
src/Utils/StringUtils.ts
@@ -10,8 +10,6 @@ export function TitleCase(string: string): string {
10
}
11
12
// 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
+export default function ReplaceVariables(template: string, variables: { [x: string]: string }) {
16
return template.replace(/\{(\w+)\}/g, (match, name) => variables[name] ?? match);
17
0 commit comments