Skip to content

[JS]: False positive "superfluous trailing arguments" for Web Streams API TransformStream constructor with one argument #18249

@AlCalzone

Description

@AlCalzone

Description of the false positive

When calling super in a subclass of TransformStream with a transformer as an argument, CodeQL complains about superfluous trailing arguments.

The TransformStream constructor can take multiple arguments, so this report isn't valid.

Code samples or links to source code

https://github.com/zwave-js/node-zwave-js/blob/6b52a22591a0f11628751b2b53a88d5d89f66b6f/packages/serial/src/parsers/BootloaderParsers.ts#L81-L89

export class BootloaderScreenParser extends TransformStream<Uint8Array, number | string>
{
	constructor() {
		super(new BootloaderScreenParserTransformer());
		// BootloaderScreenParserTransformer implements Transformer<Uint8Array, number | string>
	}
}

URL to the alert on GitHub code scanning (optional)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions