fix parameter of length to type "number" (#492)

This commit is contained in:
Akash Kriplani
2023-04-11 09:04:16 +05:30
committed by GitHub
parent 6500db9c1c
commit 25958a9548
+1 -1
View File
@@ -29,7 +29,7 @@ export const programmingLanguages: languageMap = {
// add more file extensions here, make sure the key is same as language prop in CodeBlock.tsx component
};
export const generateRandomString = (length: Number, lowercase = false) => {
export const generateRandomString = (length: number, lowercase = false) => {
const chars = 'ABCDEFGHJKLMNPQRSTUVWXY3456789'; // excluding similar looking characters like Z, 2, I, 1, O, 0
let result = '';
for (let i = 0; i < length; i++) {