Skip to content

Commit b020cfa

Browse files
committed
release: 1.3.7
1 parent e57806e commit b020cfa

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.3.7
2+
3+
- types: fix `VueInstance` type error
4+
15
## 1.3.6
26

37
- types: fix `VueInstance` type error

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# vue-class-setup
2-
Use class style to write setup and support vue2 and vue3
32

3+
Use class style to write setup and support vue2 and vue3
44

55
[![Build Status](https://github.com/fmfe/vue-class-setup/workflows/CI/badge.svg)](https://github.com/fmfe/vue-class-setup/actions)
66
<a href='https://coveralls.io/github/fmfe/vue-class-setup?branch=main'><img src='https://coveralls.io/repos/github/fmfe/vue-class-setup/badge.svg?branch=main' alt='Coverage Status' /></a>

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-class-setup",
3-
"version": "1.3.6",
3+
"version": "1.3.7",
44
"main": "dist/index.cjs.js",
55
"module": "dist/index.es.js",
66
"types": "dist/index.d.ts",

src/context.ts

+2-8
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,7 @@ export function setCurrentHookName(name: TargetName | null) {
2727
currentName = name;
2828
}
2929

30-
const WHITE_LIST: string[] = [
31-
SETUP_SETUP_DEFINE,
32-
SETUP_SETUP_DEFINE,
33-
'$vm',
34-
'$emit',
35-
'$props',
36-
];
30+
const WHITE_LIST: string[] = [SETUP_SETUP_DEFINE, '$vm', '$emit', '$props'];
3731

3832
function use(vm: VueInstance, _This: any) {
3933
let use: Map<any, InstanceType<DefineConstructor>>;
@@ -159,7 +153,7 @@ export class Context<T extends {} = {}, E extends DefaultEmit = DefaultEmit> {
159153

160154
return {
161155
setup() {
162-
return {} as InstanceType<T>;
156+
return {} as Omit<InstanceType<T>, '$vm'>;
163157
},
164158
created() {
165159
const vm = this as any as VueInstance;

0 commit comments

Comments
 (0)