Convert signal.js and preload.js to Typescript

This commit is contained in:
Scott Nonnenberg 2022-06-13 14:39:35 -07:00 committed by GitHub
parent e18510e41c
commit 2464e0a9c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
94 changed files with 2113 additions and 1848 deletions

View file

@ -12,7 +12,25 @@ import { Storage } from './Storage';
import * as WebAPI from './WebAPI';
import WebSocketResource from './WebsocketResources';
export const textsecure = {
export type TextSecureType = {
utils: typeof utils;
storage: Storage;
AccountManager: typeof AccountManager;
ContactBuffer: typeof ContactBuffer;
EventTarget: typeof EventTarget;
GroupBuffer: typeof GroupBuffer;
MessageReceiver: typeof MessageReceiver;
MessageSender: typeof MessageSender;
SyncRequest: typeof SyncRequest;
WebAPI: typeof WebAPI;
WebSocketResource: typeof WebSocketResource;
server?: WebAPI.WebAPIType;
messaging?: MessageSender;
};
export const textsecure: TextSecureType = {
utils,
storage: new Storage(),
@ -26,5 +44,3 @@ export const textsecure = {
WebAPI,
WebSocketResource,
};
export default textsecure;