Skip to content

Commit 9d7ee51

Browse files
author
MASSE
committed
fix missing extends on proxy and submodule
1 parent 514dd26 commit 9d7ee51

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
lines changed

dist/proxy.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ import { VuexModule, ProxyWatchers } from "./interfaces";
22
export declare function clearProxyCache<T extends typeof VuexModule>(cls: T): void;
33
export declare function createProxy<T extends typeof VuexModule>($store: any, cls: T): ProxyWatchers & InstanceType<T>;
44
export declare function createLocalProxy<T extends typeof VuexModule>(cls: T, $store: any): InstanceType<T>;
5-
export declare function _createProxy<T>(cls: T, $store: any, namespacedPath?: string): InstanceType<T>;
5+
export declare function _createProxy<T extends typeof VuexModule>(cls: T, $store: any, namespacedPath?: string): InstanceType<T>;

dist/proxy.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/submodule.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { VuexModule, Map, VuexObject } from "./interfaces";
22
export declare function isFieldASubModule(instance: VuexModule & Map, field: string): boolean;
33
export declare function extractVuexSubModule(instance: VuexModule & Map, field: string): VuexObject;
4-
export declare function createSubModule<T>(Cls: T): InstanceType<T>;
4+
export declare function createSubModule<T extends typeof VuexModule>(Cls: T): InstanceType<T>;

dist/submodule.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/proxy.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ import { VuexModule, ProxyWatchers } from "./interfaces";
22
export declare function clearProxyCache<T extends typeof VuexModule>(cls: T): void;
33
export declare function createProxy<T extends typeof VuexModule>($store: any, cls: T): ProxyWatchers & InstanceType<T>;
44
export declare function createLocalProxy<T extends typeof VuexModule>(cls: T, $store: any): InstanceType<T>;
5-
export declare function _createProxy<T>(cls: T, $store: any, namespacedPath?: string): InstanceType<T>;
5+
export declare function _createProxy<T extends typeof VuexModule>(cls: T, $store: any, namespacedPath?: string): InstanceType<T>;

js/proxy.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/submodule.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { VuexModule, Map, VuexObject } from "./interfaces";
22
export declare function isFieldASubModule(instance: VuexModule & Map, field: string): boolean;
33
export declare function extractVuexSubModule(instance: VuexModule & Map, field: string): VuexObject;
4-
export declare function createSubModule<T>(Cls: T): InstanceType<T>;
4+
export declare function createSubModule<T extends typeof VuexModule>(Cls: T): InstanceType<T>;

js/submodule.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/proxy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export function createLocalProxy<T extends typeof VuexModule>( cls :T, $store :a
109109
return proxy as InstanceType<T>;
110110
}
111111

112-
export function _createProxy<T>(cls: T, $store: any, namespacedPath = "") {
112+
export function _createProxy<T extends typeof VuexModule>(cls: T, $store: any, namespacedPath = "") {
113113

114114
//@ts-ignore
115115
const VuexClass = cls as VuexModuleConstructor;

src/submodule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function extractVuexSubModule( instance :VuexModule & Map, field :string
1616
return extract[ path ];
1717
}
1818

19-
export function createSubModule<T>( Cls :T ) {
19+
export function createSubModule<T extends typeof VuexModule>( Cls :T ) {
2020
const sub :SubModuleType<T> = {
2121
__submodule_type__: "submodule",
2222
__submodule_class__: Cls,

0 commit comments

Comments
 (0)