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: argument validation of parameters with defaults, Map and Set #7435

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

AlCalzone
Copy link
Member

fixes the issue reported in #7430 (reply in thread)

@AlCalzone
Copy link
Member Author

@zwave-js-bot automerge

@zwave-js-bot zwave-js-bot enabled auto-merge (squash) November 22, 2024 16:16
class Test {
@validateArgs()
foo(arg1: number = 5): void {
arg1;

Check warning

Code scanning / CodeQL

Expression has no effect Warning test

This expression has no effect.

@validateArgs()
bar(arg1: number | string = 5): void {
arg1;

Check warning

Code scanning / CodeQL

Expression has no effect Warning test

This expression has no effect.
class Test {
@validateArgs()
map(arg1: Map<any, any>): void {
arg1;

Check warning

Code scanning / CodeQL

Expression has no effect Warning test

This expression has no effect.

@validateArgs()
readonlyMap(arg1: ReadonlyMap<any, any>): void {
arg1;

Check warning

Code scanning / CodeQL

Expression has no effect Warning test

This expression has no effect.

@validateArgs()
set(arg1: Set<any>): void {
arg1;

Check warning

Code scanning / CodeQL

Expression has no effect Warning test

This expression has no effect.

@validateArgs()
readonlySet(arg1: ReadonlySet<any>): void {
arg1;

Check warning

Code scanning / CodeQL

Expression has no effect Warning test

This expression has no effect.
@zwave-js-bot zwave-js-bot merged commit 74deab4 into master Nov 22, 2024
23 checks passed
@zwave-js-bot zwave-js-bot deleted the validateargs-defaults branch November 22, 2024 16:20
AlCalzone added a commit that referenced this pull request Nov 22, 2024
### Bugfixes
* Fixed another issue where some CC API methods would incorrectly fail validation of their arguments, causing the node interview to fail (#7435)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants