Skip to content

Commit

Permalink
types(reactivity): rename ComputedGetterWithVModel to ComputedGetterW…
Browse files Browse the repository at this point in the history
…ithInstance
  • Loading branch information
unshame authored and Oleg Shibaev committed Jun 2, 2022
1 parent ecf051b commit 363d6e9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions packages/reactivity/src/computed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ export interface WritableComputedRef<T> extends Ref<T> {
}

export type ComputedGetter<T> = () => T
export type ComputedGetterWithVModel<T> = (...args: any[]) => T
export type ComputedGetterWithInstance<T> = (...args: any[]) => T
export type ComputedSetter<T> = (v: T) => void

export interface WritableComputedOptions<T> {
get: ComputedGetter<T>
set: ComputedSetter<T>
}

export interface WritableComputedOptionsWithVModel<T> {
get: ComputedGetterWithVModel<T>
export interface WritableComputedOptionsWithInstance<T> {
get: ComputedGetterWithInstance<T>
set: ComputedSetter<T>
}

Expand Down
4 changes: 2 additions & 2 deletions packages/reactivity/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export {
ComputedRef,
WritableComputedRef,
WritableComputedOptions,
WritableComputedOptionsWithVModel,
WritableComputedOptionsWithInstance,
ComputedGetter,
ComputedGetterWithVModel,
ComputedGetterWithInstance,
ComputedSetter
} from './computed'
export { deferredComputed } from './deferredComputed'
Expand Down
6 changes: 3 additions & 3 deletions packages/runtime-core/src/componentOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ import {
} from './apiLifecycle'
import {
reactive,
ComputedGetterWithVModel,
WritableComputedOptionsWithVModel
ComputedGetterWithInstance,
WritableComputedOptionsWithInstance
} from '@vue/reactivity'
import {
ComponentObjectPropsOptions,
Expand Down Expand Up @@ -360,7 +360,7 @@ export type ComponentOptionsMixin = ComponentOptionsBase<

export type ComputedOptions = Record<
string,
ComputedGetterWithVModel<any> | WritableComputedOptionsWithVModel<any>
ComputedGetterWithInstance<any> | WritableComputedOptionsWithInstance<any>
>

export interface MethodOptions {
Expand Down

0 comments on commit 363d6e9

Please sign in to comment.