Skip to content

Commit 0a9f57f

Browse files
committed
fix: Store type
1 parent 516c0fc commit 0a9f57f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const ConfigContext = createContext(null);
2222
export interface Config {
2323
// a reference to the current Grid.js instance
2424
instance: Grid;
25-
store: Store<unknown>;
25+
store: Store;
2626
eventEmitter: EventEmitter<GridEvents>;
2727
plugin: PluginManager;
2828
/** container element that is used to mount the Grid.js to */
@@ -117,7 +117,7 @@ export class Config {
117117
return this;
118118
}
119119

120-
static defaultConfig(): Config {
120+
static defaultConfig(): Partial<Config> {
121121
return {
122122
store: new Store({
123123
status: Status.Init,
@@ -131,7 +131,7 @@ export class Config {
131131
autoWidth: true,
132132
style: {},
133133
className: {},
134-
} as Config;
134+
};
135135
}
136136

137137
static fromPartialConfig(partialConfig: Partial<Config>): Partial<Config> {

src/state/store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export class Store<S> {
1+
export class Store<S = Record<string, unknown>> {
22
private state: S;
33
private listeners: (() => void)[] = [];
44
private isDispatching = false;

0 commit comments

Comments
 (0)