8000 release: vue-class-setup@1.3.9 · dp-os/vue-class-setup@52feb3a · GitHub
[go: up one dir, main page]

Skip to content

Commit 52feb3a

Browse files
committed
release: vue-class-setup@1.3.9
1 parent a740f5f commit 52feb3a

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.3.9
2+
3+
- fix: Type failure
4+
15
## 1.3.8
26

37
- types: fix `DeepReadonly` to `Readonly`

package.json

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

src/context.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,19 @@ export class Context<T extends {} = {}, E extends DefaultEmit = DefaultEmit> {
151151
public static inject<T extends new (...args: any) => any>(this: T) {
152152
const _This = this;
153153

154-
return {
155-
setup() {
156-
return {} as Omit<InstanceType<T>, '$vm'>;
157-
},
154+
const options: any = {
158155
created() {
159156
const vm = this as any as VueInstance;
160157
const app = use(vm, _This);
161158
initInject(app, vm);
162159
},
163160
};
161+
162+
return options as {
163+
setup?: () => Omit<InstanceType<T>, '$vm'>;
164+
data?: () => Omit<InstanceType<T>, '$vm'>;
165+
created(): void;
166+
};
164167
}
165168
public $vm: VueInstance;
166169
public $emit: E;

0 commit comments

Comments
 (0)
0