Skip to content

Commit

Permalink
refactor: rename signal to dependency in reactivity adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnowack committed Oct 4, 2023
1 parent 9ab888c commit a8f03fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/createReactivityAdapter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type ReactivityAdapter from './types/ReactivityAdapter'
import type { Signal } from './types/ReactivityAdapter'
import type { Dependency } from './types/ReactivityAdapter'

export default function createReactivityAdapter<T extends Signal = Signal>(
export default function createReactivityAdapter<T extends Dependency = Dependency>(
definition: ReactivityAdapter<T>,
) {
return definition
Expand Down
6 changes: 3 additions & 3 deletions src/types/ReactivityAdapter.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export interface Signal {
export interface Dependency {
depend(): void,
notify(): void,
}

export default interface ReactivityAdapter<T extends Signal = Signal> {
export default interface ReactivityAdapter<T extends Dependency = Dependency> {
create(): T,
onDispose?(callback: () => void, signal: T): void,
onDispose?(callback: () => void, Dependency: T): void,
isInScope?(): boolean,
}

0 comments on commit a8f03fb

Please sign in to comment.