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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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++) {