Skip to content

Commit 335245f

Browse files
refactor(NullState): modify set() and add unset().
1 parent a07f9db commit 335245f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/lib/null-state.abstract.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,18 @@ export abstract class NullState extends State<null | undefined> {
3333
* @param {?null} [state]
3434
* @returns {this}
3535
*/
36-
public override set(state?: null) {
37-
super.set(state);
36+
public override set() {
37+
super.set(null);
38+
return this;
39+
}
40+
41+
/**
42+
* @description
43+
* @public
44+
* @returns {this}
45+
*/
46+
public unset() {
47+
super.set(undefined);
3848
return this;
3949
}
4050
}

0 commit comments

Comments
 (0)