@@ -18,20 +18,20 @@ import { Cases, Option } from "./types";
1818 */
1919export abstract class Optional < T > {
2020 /**
21- * Represents whether this is present or not.
21+ * Returns whether this is present or not.
2222 *
2323 * If a payload is present, be `true` , otherwise be `false`.
2424 */
25- abstract get isPresent ( ) : boolean ;
25+ abstract isPresent ( ) : boolean ;
2626
2727 /**
28- * Represents whether this is empty or not.
28+ * Returns whether this is empty or not.
2929 *
3030 * If this is empty, be `true`, otherwise be `false`.
31- * This method is negation of `Optional. isPresent`.
31+ * This method is negation of `Optional# isPresent`.
3232 */
33- get isEmpty ( ) : boolean {
34- return ! this . isPresent ;
33+ isEmpty ( ) : boolean {
34+ return ! this . isPresent ( ) ;
3535 }
3636
3737 /**
@@ -219,7 +219,7 @@ export abstract class Optional<T> {
219219class PresentOptional < T > extends Optional < T > {
220220 payload : T ;
221221
222- get isPresent ( ) : boolean {
222+ isPresent ( ) : boolean {
223223 return true ;
224224 }
225225
@@ -291,7 +291,7 @@ class PresentOptional<T> extends Optional<T> {
291291}
292292
293293class EmptyOptional < T > extends Optional < T > {
294- get isPresent ( ) : boolean {
294+ isPresent ( ) : boolean {
295295 return false ;
296296 }
297297
0 commit comments