Skip to content

Commit

Permalink
release: 1.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
lzxb committed Dec 23, 2022
1 parent e57806e commit b020cfa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.3.7

- types: fix `VueInstance` type error

## 1.3.6

- types: fix `VueInstance` type error
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# vue-class-setup
Use class style to write setup and support vue2 and vue3

Use class style to write setup and support vue2 and vue3

[![Build Status](https://github.com/fmfe/vue-class-setup/workflows/CI/badge.svg)](https://github.com/fmfe/vue-class-setup/actions)
<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>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-class-setup",
"version": "1.3.6",
"version": "1.3.7",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
"types": "dist/index.d.ts",
Expand Down
10 changes: 2 additions & 8 deletions src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,7 @@ export function setCurrentHookName(name: TargetName | null) {
currentName = name;
}

const WHITE_LIST: string[] = [
SETUP_SETUP_DEFINE,
SETUP_SETUP_DEFINE,
'$vm',
'$emit',
'$props',
];
const WHITE_LIST: string[] = [SETUP_SETUP_DEFINE, '$vm', '$emit', '$props'];

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

return {
setup() {
return {} as InstanceType<T>;
return {} as Omit<InstanceType<T>, '$vm'>;
},
created() {
const vm = this as any as VueInstance;
Expand Down

0 comments on commit b020cfa

Please sign in to comment.