Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ignore): overrides #1267

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/adapter/deconz/driver/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Parser extends Transform {
logger.debug(`<-- error '${error}'`, NS);
}

public _transform(chunk: Buffer, _: string, cb: TransformCallback): void {
public override _transform(chunk: Buffer, _: string, cb: TransformCallback): void {
//logger.debug(`<-- [${[...chunk]}]`, NS);
this.decoder.decode(chunk);
//logger.debug(`<-- [${[...chunk]}]`, NS);
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/deconz/driver/writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Writer extends stream.Readable {
this.push(buffer);
}

public _read(): void {}
public override _read(): void {}
}

export default Writer;
4 changes: 2 additions & 2 deletions src/adapter/ember/uart/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class AshParser extends Transform {
this.buffer = Buffer.alloc(0);
}

_transform(chunk: Buffer, encoding: BufferEncoding, cb: TransformCallback): void {
override _transform(chunk: Buffer, encoding: BufferEncoding, cb: TransformCallback): void {
let data = Buffer.concat([this.buffer, chunk]);
let position: number;

Expand All @@ -37,7 +37,7 @@ export class AshParser extends Transform {
cb();
}

_flush(cb: TransformCallback): void {
override _flush(cb: TransformCallback): void {
this.push(this.buffer);

this.buffer = Buffer.alloc(0);
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/ember/uart/writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ export class AshWriter extends Readable {
}
}

public _read(): void {}
public override _read(): void {}
}
2 changes: 1 addition & 1 deletion src/adapter/ezsp/driver/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class Parser extends stream.Transform {
this.tail = [];
}

public _transform(chunk: Buffer, _: string, cb: () => void): void {
public override _transform(chunk: Buffer, _: string, cb: () => void): void {
if (chunk.indexOf(consts.CANCEL) >= 0) {
this.reset();
chunk = chunk.subarray(chunk.lastIndexOf(consts.CANCEL) + 1);
Expand Down
12 changes: 6 additions & 6 deletions src/adapter/ezsp/driver/types/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class int64s extends int_t {
}

export class uint_t extends int_t {
static _signed = false;
static override _signed = false;
}

export class uint8_t extends uint_t {
Expand Down Expand Up @@ -126,14 +126,14 @@ export abstract class List {

class _LVList extends List {
/* eslint-disable-next-line @typescript-eslint/no-explicit-any*/
static serialize(cls: any, value: any[]): Buffer {
static override serialize(cls: any, value: any[]): Buffer {
const head = [cls.length];
const data = super.serialize(cls, value);
return Buffer.from(head.concat(data));
}

/* eslint-disable-next-line @typescript-eslint/no-explicit-any*/
static deserialize(cls: any, data: Buffer): any[] {
static override deserialize(cls: any, data: Buffer): any[] {
let item, length;
/* eslint-disable-next-line @typescript-eslint/no-explicit-any*/
const r: any[] = [];
Expand Down Expand Up @@ -166,21 +166,21 @@ export function LVList(itemtype: any): List {

export class WordList extends List {
/* eslint-disable-next-line @typescript-eslint/no-explicit-any*/
static serialize(cls: any, value: any[]): Buffer {
static override serialize(cls: any, value: any[]): Buffer {
const data = value.map((i) => Buffer.from(uint16_t.serialize(uint16_t, i)));
return Buffer.concat(data);
}
}

class _FixedList extends List {
/* eslint-disable-next-line @typescript-eslint/no-explicit-any*/
static serialize(cls: any, value: any[]): Buffer {
static override serialize(cls: any, value: any[]): Buffer {
const data = value.map((i) => cls.itemtype.serialize(cls.itemtype, i)[0]);
return Buffer.from(data);
}

/* eslint-disable-next-line @typescript-eslint/no-explicit-any*/
static deserialize(cls: any, data: Buffer): any[] {
static override deserialize(cls: any, data: Buffer): any[] {
let item;
/* eslint-disable-next-line @typescript-eslint/no-explicit-any*/
const r: any[] = [];
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/ezsp/driver/types/named.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class EmberEUI64 extends fixed_list(8, basic.uint8_t) {
}

/* eslint-disable-next-line @typescript-eslint/no-explicit-any*/
static deserialize(cls: any, data: Buffer): any[] {
static override deserialize(cls: any, data: Buffer): any[] {
const arr = super.deserialize(cls, data);
const r = arr[0];
data = arr[1] as Buffer;
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/ezsp/driver/types/struct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ export class EmberMultiAddress extends EzspStruct {
['nwk', named.EmberNodeId],
];
/* eslint-disable-next-line @typescript-eslint/no-explicit-any*/
static serialize(cls: any, obj: any): Buffer {
static override serialize(cls: any, obj: any): Buffer {
const addrmode = obj['addrmode'];

const fields = addrmode == 3 ? cls.fields3 : cls.fields1;
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/ezsp/driver/writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class Writer extends stream.Readable {
this.push(buffer);
}

public _read(): void {}
public override _read(): void {}

public sendACK(ackNum: number): void {
/* Construct a acknowledgement frame */
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/z-stack/unpi/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Parser extends stream.Transform {
this.buffer = Buffer.from([]);
}

public _transform(chunk: Buffer, _: string, cb: () => void): void {
public override _transform(chunk: Buffer, _: string, cb: () => void): void {
logger.debug(`<-- [${[...chunk]}]`, NS);
this.buffer = Buffer.concat([this.buffer, chunk]);
this.parseNext();
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/z-stack/unpi/writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Writer extends stream.Readable {
this.push(buffer);
}

public _read(): void {}
public override _read(): void {}
}

export default Writer;
4 changes: 2 additions & 2 deletions src/adapter/zboss/frame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {BuffaloZBOSSDataType, CommandId} from './enums';

export class ZBOSSBuffaloZcl extends BuffaloZcl {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
public write(type: DataType | BuffaloZclDataType | BuffaloZBOSSDataType, value: any, options: BuffaloZclOptions): void {
public override write(type: DataType | BuffaloZclDataType | BuffaloZBOSSDataType, value: any, options: BuffaloZclOptions): void {
switch (type) {
case BuffaloZBOSSDataType.EXTENDED_PAN_ID: {
return this.writeBuffer(value, 8);
Expand All @@ -25,7 +25,7 @@ export class ZBOSSBuffaloZcl extends BuffaloZcl {
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
public read(type: DataType | BuffaloZclDataType | BuffaloZBOSSDataType, options: BuffaloZclOptions): any {
public override read(type: DataType | BuffaloZclDataType | BuffaloZBOSSDataType, options: BuffaloZclOptions): any {
switch (type) {
case BuffaloZBOSSDataType.EXTENDED_PAN_ID: {
return this.readBuffer(8);
Expand Down
4 changes: 2 additions & 2 deletions src/adapter/zboss/reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class ZBOSSReader extends Transform {
this.buffer = Buffer.alloc(0);
}

_transform(chunk: Buffer, encoding: BufferEncoding, cb: TransformCallback): void {
override _transform(chunk: Buffer, encoding: BufferEncoding, cb: TransformCallback): void {
let data = Buffer.concat([this.buffer, chunk]);
let position: number;

Expand Down Expand Up @@ -54,7 +54,7 @@ export class ZBOSSReader extends Transform {
cb();
}

_flush(cb: TransformCallback): void {
override _flush(cb: TransformCallback): void {
this.push(this.buffer);

this.buffer = Buffer.alloc(0);
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/zboss/writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ export class ZBOSSWriter extends Readable {
}
}

public _read(): void {}
public override _read(): void {}
}
6 changes: 3 additions & 3 deletions src/adapter/zigate/adapter/patchZdoBuffaloBE.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import {BuffaloZdo} from '../../../zspec/zdo/buffaloZdo';

class ZiGateZdoBuffalo extends BuffaloZdo {
public writeUInt16(value: number): void {
public override writeUInt16(value: number): void {
this.buffer.writeUInt16BE(value, this.position);
this.position += 2;
}

public writeUInt32(value: number): void {
public override writeUInt32(value: number): void {
this.buffer.writeUInt32BE(value, this.position);
this.position += 4;
}

public writeIeeeAddr(value: string /*TODO: EUI64*/): void {
public override writeIeeeAddr(value: string /*TODO: EUI64*/): void {
this.writeUInt32(parseInt(value.slice(2, 10), 16));
this.writeUInt32(parseInt(value.slice(10), 16));
}
Expand Down
Loading