Let's make it very NOICE

This commit is contained in:
jordan4ibanez 2024-04-17 11:15:47 -04:00
parent d5fd6d0b5a
commit cf7ab6cc07

View File

@ -23,12 +23,16 @@ namespace utility {
}
someFunction<T>(f: (input: T) => void): Option<T> {
f(this.data as T);
if (this.data != null) {
f(this.data as T);
}
return this as unknown as Option<T>;
}
noneFunction<T>(f: () => void): Option<T> {
f();
if (this.data == null) {
f();
}
return this as unknown as Option<T>;
}