Skip to content

Commit 44a9799

Browse files
refactor(Value): add the setValue() method.
1 parent 18f07d6 commit 44a9799

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

src/lib/value.class.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @description
2+
* @description The class to manage the value of generic type variable `Type`.
33
* @export
44
* @abstract
55
* @class Value
@@ -24,11 +24,21 @@ export abstract class Value<Type> {
2424
#value: Type;
2525

2626
/**
27-
* Creates an instance of `Value`.
27+
* Creates an instance of child class.
2828
* @constructor
29-
* @param {Type} value
29+
* @param {Type} value The value of generic type variable `Type`.
3030
*/
3131
constructor(value: Type) {
3232
this.#value = value;
3333
}
34-
}
34+
35+
/**
36+
* @description Sets the value of generic type variable `Type`.
37+
* @protected
38+
* @returns {this}
39+
*/
40+
protected setValue(value: Type) {
41+
this.#value = value;
42+
return this;
43+
}
44+
}

0 commit comments

Comments
 (0)