Skip to content

Commit

Permalink
Update ref.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Nov 13, 2024
1 parent 4c4b2d7 commit 0fdcb68
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/reactivity/src/ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
toRaw,
toReactive,
} from './reactive'
import { Dependency, System, endBatch, startBatch } from './system'
import { Dependency, Link, System, endBatch, startBatch } from './system'

Check failure on line 22 in packages/reactivity/src/ref.ts

View workflow job for this annotation

GitHub Actions / test / lint-and-test-dts

Imports "Link" are only used as type
import { warn } from './warning'

declare const RefSymbol: unique symbol
Expand Down Expand Up @@ -109,8 +109,8 @@ function createRef(rawValue: unknown, shallow: boolean) {
*/
class RefImpl<T = any> implements Dependency {
// Dependency
subs = undefined
subsTail = undefined
subs: Link | undefined = undefined
subsTail: Link | undefined = undefined

_value: T
private _rawValue: T
Expand Down Expand Up @@ -302,8 +302,8 @@ export type CustomRefFactory<T> = (

class CustomRefImpl<T> implements Dependency {
// Dependency
subs = undefined
subsTail = undefined
subs: Link | undefined = undefined
subsTail: Link | undefined = undefined

private readonly _get: ReturnType<CustomRefFactory<T>>['get']
private readonly _set: ReturnType<CustomRefFactory<T>>['set']
Expand Down

0 comments on commit 0fdcb68

Please sign in to comment.