types: massive refactor

This commit is contained in:
Evan You
2019-10-22 11:26:48 -04:00
parent 522beaa766
commit b5886189ba
21 changed files with 308 additions and 258 deletions

View File

@@ -24,7 +24,7 @@ export function computed<T>(
): WritableComputedRef<T>
export function computed<T>(
getterOrOptions: ComputedGetter<T> | WritableComputedOptions<T>
): any {
) {
const isReadonly = isFunction(getterOrOptions)
const getter = isReadonly
? (getterOrOptions as ComputedGetter<T>)