diff --git a/src/randomstring.js b/src/randomstring.ts similarity index 88% rename from src/randomstring.js rename to src/randomstring.ts index 7ebe4ed78..3362c0b02 100644 --- a/src/randomstring.js +++ b/src/randomstring.ts @@ -1,5 +1,6 @@ /* Copyright 2018 New Vector Ltd +Copyright 2019 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -export function randomString(len) { +export function randomString(len: number): string { let ret = ""; const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";