Skip to content

Commit

Permalink
docs: SetupContext.refs type, remove unnecessary docs (#611)
Browse files Browse the repository at this point in the history
* Update README.md

* Fix type of SetupContext.ref

* Remove redundant docs
  • Loading branch information
subdavis committed Dec 14, 2020
1 parent 160a29b commit 27ff2f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
12 changes: 0 additions & 12 deletions README.md
Expand Up @@ -368,18 +368,6 @@ export default {
}
```

You may also need to augment the `SetupContext` when working with TypeScript:

```ts
import Vue from 'vue'

declare module '@vue/composition-api' {
interface SetupContext {
readonly refs: { [key: string]: Vue | Element | Vue[] | Element[] }
}
}
```

</details>

### Reactive
Expand Down
4 changes: 2 additions & 2 deletions src/component/componentOptions.ts
@@ -1,4 +1,4 @@
import { VNode, ComponentOptions as Vue2ComponentOptions } from 'vue'
import Vue, { VNode, ComponentOptions as Vue2ComponentOptions } from 'vue'
import { Data } from './common'
import { ComponentPropsOptions, ExtractPropTypes } from './componentProps'
import { ComponentInstance, ComponentRenderProxy } from './componentProxy'
Expand All @@ -25,7 +25,7 @@ export interface SetupContext {
/**
* @deprecated not avaliable in Vue 3
*/
readonly refs: Data
readonly refs: { [key: string]: Vue | Element | Vue[] | Element[] }

emit(event: string, ...args: any[]): void
}
Expand Down

0 comments on commit 27ff2f3

Please sign in to comment.