Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: SetupContext.refs type, remove unnecessary docs #611

Merged
merged 3 commits into from Dec 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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