Created
January 1, 2024 06:16
-
-
Save dlOuOlb/c74571099589364ca34ae3ce013f2528 to your computer and use it in GitHub Desktop.
Explicitly ignoring a return value.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** This class provides a static property `void` which just __ignores__ any assigned value. */ | |
export default class extends null | |
{ | |
static get void( ) { return; } | |
static set void(_) { return; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just use the
void
operator.