Skip to content

Commit

Permalink
chore(types): export UnwrapNestedRefs type (#779)
Browse files Browse the repository at this point in the history
Co-authored-by: webfansplz <>
  • Loading branch information
webfansplz committed Aug 1, 2021
1 parent 3421a79 commit 6890852
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/reactivity/index.ts
Expand Up @@ -29,4 +29,4 @@ export type {
UnwrapRefSimple,
ShallowUnwrapRef,
} from './ref'
export type { DeepReadonly } from './readonly'
export type { DeepReadonly, UnwrapNestedRefs } from './readonly'
2 changes: 1 addition & 1 deletion src/reactivity/readonly.ts
Expand Up @@ -33,7 +33,7 @@ export type DeepReadonly<T> = T extends Builtin
: Readonly<T>

// only unwrap nested ref
type UnwrapNestedRefs<T> = T extends Ref ? T : UnwrapRefSimple<T>
export type UnwrapNestedRefs<T> = T extends Ref ? T : UnwrapRefSimple<T>

/**
* **In @vue/composition-api, `reactive` only provides type-level readonly check**
Expand Down

0 comments on commit 6890852

Please sign in to comment.