Moves libtextsecure to Typescript
* Starting to work through lint errors * libsignal-protocol: Update changes for primary repo compatibility * Step 1: task_with_timeout rename * Step 2: Apply the changes to TaskWithTimeout.ts * Step 1: All to-be-converted libtextsecure/*.js files moved * Step 2: No Typescript errors! * Get libtextsecure tests passing again * TSLint errors down to 1 * Compilation succeeds, no lint errors or test failures * WebSocketResources - update import for case-sensitive filesystems * Fixes for lint-deps * Remove unnecessary @ts-ignore * Fix inability to message your own contact after link * Add log message for the end of migration 20 * lint fix
This commit is contained in:
parent
2f2d027161
commit
b7d56def82
45 changed files with 5983 additions and 4042 deletions
|
@ -1,5 +1,3 @@
|
|||
/* global ContactBuffer, GroupBuffer, textsecure */
|
||||
|
||||
describe('ContactBuffer', () => {
|
||||
function getTestBuffer() {
|
||||
const buffer = new dcodeIO.ByteBuffer();
|
||||
|
@ -10,7 +8,7 @@ describe('ContactBuffer', () => {
|
|||
}
|
||||
avatarBuffer.limit = avatarBuffer.offset;
|
||||
avatarBuffer.offset = 0;
|
||||
const contactInfo = new textsecure.protobuf.ContactDetails({
|
||||
const contactInfo = new window.textsecure.protobuf.ContactDetails({
|
||||
name: 'Zero Cool',
|
||||
number: '+10000000000',
|
||||
uuid: '7198E1BD-1293-452A-A098-F982FF201902',
|
||||
|
@ -31,7 +29,7 @@ describe('ContactBuffer', () => {
|
|||
|
||||
it('parses an array buffer of contacts', () => {
|
||||
const arrayBuffer = getTestBuffer();
|
||||
const contactBuffer = new ContactBuffer(arrayBuffer);
|
||||
const contactBuffer = new window.textsecure.ContactBuffer(arrayBuffer);
|
||||
let contact = contactBuffer.next();
|
||||
let count = 0;
|
||||
while (contact !== undefined) {
|
||||
|
@ -62,7 +60,7 @@ describe('GroupBuffer', () => {
|
|||
}
|
||||
avatarBuffer.limit = avatarBuffer.offset;
|
||||
avatarBuffer.offset = 0;
|
||||
const groupInfo = new textsecure.protobuf.GroupDetails({
|
||||
const groupInfo = new window.textsecure.protobuf.GroupDetails({
|
||||
id: new Uint8Array([1, 3, 3, 7]).buffer,
|
||||
name: 'Hackers',
|
||||
membersE164: ['cereal', 'burn', 'phreak', 'joey'],
|
||||
|
@ -89,7 +87,7 @@ describe('GroupBuffer', () => {
|
|||
|
||||
it('parses an array buffer of groups', () => {
|
||||
const arrayBuffer = getTestBuffer();
|
||||
const groupBuffer = new GroupBuffer(arrayBuffer);
|
||||
const groupBuffer = new window.textsecure.GroupBuffer(arrayBuffer);
|
||||
let group = groupBuffer.next();
|
||||
let count = 0;
|
||||
while (group !== undefined) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue