Migrate textsecure to eslint

Co-authored-by: Chris Svenningsen <chris@carbonfive.com>
This commit is contained in:
Sidney Keese 2020-09-24 14:53:21 -07:00 committed by Josh Perez
parent b5df9b4067
commit 7b6d8f55d6
24 changed files with 706 additions and 299 deletions

View file

@ -1,3 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable max-classes-per-file */
import { ByteBufferClass } from '../window.d';
import { AttachmentType } from './SendMessage';
@ -18,6 +21,7 @@ export type PackedAttachmentType = AttachmentType & {
export class ProtoParser {
buffer: ByteBufferClass;
protobuf: ProtobufConstructorType;
constructor(arrayBuffer: ArrayBuffer, protobuf: ProtobufConstructorType) {
@ -28,7 +32,7 @@ export class ProtoParser {
this.buffer.limit = arrayBuffer.byteLength;
}
next() {
next(): ProtobufType | undefined | null {
try {
if (this.buffer.limit === this.buffer.offset) {
return undefined; // eof