1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-10 09:22:25 +03:00

Convert src/SecurityManager.js to TypeScript

This includes a few small API tweaks as well, only in cases where TS revealed we
were doing something confusing or wrong.

Part of https://github.com/vector-im/element-web/issues/15350
This commit is contained in:
J. Ryan Stinnett
2020-10-09 16:59:56 +01:00
parent e92af6cb73
commit 2698a12a6f
4 changed files with 55 additions and 35 deletions

View File

@@ -17,6 +17,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { ICreateClientOpts } from 'matrix-js-sdk/src/matrix';
import {MatrixClient} from 'matrix-js-sdk/src/client';
import {MemoryStore} from 'matrix-js-sdk/src/store/memory';
import * as utils from 'matrix-js-sdk/src/utils';
@@ -249,8 +250,7 @@ class _MatrixClientPeg implements IMatrixClientPeg {
}
private createClient(creds: IMatrixClientCreds): void {
// TODO: Make these opts typesafe with the js-sdk
const opts = {
const opts: ICreateClientOpts = {
baseUrl: creds.homeserverUrl,
idBaseUrl: creds.identityServerUrl,
accessToken: creds.accessToken,