Skip to content

Commit

Permalink
refactor: remove unneeded non-null assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Dec 26, 2024
1 parent f6758c4 commit b4e386f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/signal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ export class Signal<T = any> implements Dependency, IWritableSignal<T> {
public currentValue: T
) { }

get(): NonNullable<T> {
get(): T {
if (activeTrackId && this.lastTrackedId !== activeTrackId) {
this.lastTrackedId = activeTrackId;
link(this, activeSub!);
}
return this.currentValue!;
return this.currentValue;
}

set(value: T): void {
Expand Down

0 comments on commit b4e386f

Please sign in to comment.