From 2bc511637bdc3da7558ccb8176a8b8d823a0a067 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Tue, 26 Mar 2024 14:16:33 +0100 Subject: [PATCH] fix: imports for module resolution NodeNext --- typings/combineReducers.d.ts | 4 ++-- typings/compat.d.ts | 4 ++-- typings/connect.d.ts | 4 ++-- typings/devtools.d.ts | 4 ++-- typings/index.d.ts | 20 ++++++++++---------- typings/model.d.ts | 4 ++-- typings/modelStore.d.ts | 8 ++++---- typings/models.d.ts | 2 +- typings/persist.d.ts | 6 +++--- typings/routing.d.ts | 4 ++-- typings/thunk.d.ts | 4 ++-- 11 files changed, 32 insertions(+), 32 deletions(-) diff --git a/typings/combineReducers.d.ts b/typings/combineReducers.d.ts index 3cc6e19..b774140 100644 --- a/typings/combineReducers.d.ts +++ b/typings/combineReducers.d.ts @@ -1,3 +1,3 @@ -import { Reducer, Reducers, State } from './store' +import { Reducer, Reducers, State } from './store.js' -export declare function combineReducers(reducers: R): Reducer> \ No newline at end of file +export declare function combineReducers(reducers: R): Reducer> diff --git a/typings/compat.d.ts b/typings/compat.d.ts index 4fdf169..92de614 100644 --- a/typings/compat.d.ts +++ b/typings/compat.d.ts @@ -1,4 +1,4 @@ -import { Store } from "./store" +import { Store } from "./store.js" import { Middleware } from "redux" export function applyMiddleware(store: Store, @@ -26,4 +26,4 @@ export function applyMiddleware(store: Store, middleware4: Middleware[], middleware5: Middleware[], ): Store -export function applyMiddleware(store: Store, ...middlewares: Middleware[]): Store \ No newline at end of file +export function applyMiddleware(store: Store, ...middlewares: Middleware[]): Store diff --git a/typings/connect.d.ts b/typings/connect.d.ts index a4b8984..eab2c68 100644 --- a/typings/connect.d.ts +++ b/typings/connect.d.ts @@ -1,4 +1,4 @@ -import { Store } from './store' +import { Store } from './store.js' export interface DispatchMap { [key: string]: (event: T) => void } @@ -20,4 +20,4 @@ export type Constructor = new (...args: any[]) => T export declare function connect, S>( store: Store, superclass: T -): Constructor & T \ No newline at end of file +): Constructor & T diff --git a/typings/devtools.d.ts b/typings/devtools.d.ts index c0005e7..74f21e0 100644 --- a/typings/devtools.d.ts +++ b/typings/devtools.d.ts @@ -1,3 +1,3 @@ -import { Store } from './store' +import { Store } from './store.js' -export declare function devtools(store: T, options?: any): T \ No newline at end of file +export declare function devtools(store: T, options?: any): T diff --git a/typings/index.d.ts b/typings/index.d.ts index 158be11..6f6bb42 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1,10 +1,10 @@ -export * from './combineReducers' -export * from './connect' -export * from './devtools' -export * from './model' -export * from './models' -export { Plugin, Plugins, Config, createStore, StoreState, StoreDispatch} from './modelStore' -export * from './persist' -export * from './routing' -export * from './store' -export * from './thunk' +export * from './combineReducers.js' +export * from './connect.js' +export * from './devtools.js' +export * from './model.js' +export * from './models.js' +export { Plugin, Plugins, Config, createStore, StoreState, StoreDispatch} from './modelStore.js' +export * from './persist.js' +export * from './routing.js' +export * from './store.js' +export * from './thunk.js' diff --git a/typings/model.d.ts b/typings/model.d.ts index 53a298b..559b157 100644 --- a/typings/model.d.ts +++ b/typings/model.d.ts @@ -1,4 +1,4 @@ -import { GetState } from "./store" +import { GetState } from "./store.js" export type ReducerFn = (state: S, payload: P) => S @@ -45,4 +45,4 @@ type ActionsFromModelEffectFns = { type ModelDispatch, E extends EffectFns> = ActionsFromModelReducerFns & ActionsFromModelEffectFns -export declare function createModel, E extends EffectFns>(model: Model): Model \ No newline at end of file +export declare function createModel, E extends EffectFns>(model: Model): Model diff --git a/typings/modelStore.d.ts b/typings/modelStore.d.ts index 0169eeb..52e7b22 100644 --- a/typings/modelStore.d.ts +++ b/typings/modelStore.d.ts @@ -1,6 +1,6 @@ -import { Model } from './model' -import { Models, ModelsDispatch, ModelsState } from './models' -import { Store, Dispatch } from './store' +import { Model } from './model.js' +import { Models, ModelsDispatch, ModelsState } from './models.js' +import { Store, Dispatch } from './store.js' export interface Plugin { // if the plugin adds any state to the store, it can define it's own model @@ -51,4 +51,4 @@ export declare function createStore(config: C): ModelStore = ModelsState> -export type StoreDispatch = ModelsDispatch> \ No newline at end of file +export type StoreDispatch = ModelsDispatch> diff --git a/typings/models.d.ts b/typings/models.d.ts index 204cea4..eea0dcc 100644 --- a/typings/models.d.ts +++ b/typings/models.d.ts @@ -1,4 +1,4 @@ -import { Model, ModelDispatch } from './model' +import { Model, ModelDispatch } from './model.js' interface Models { [name: string]: Model diff --git a/typings/persist.d.ts b/typings/persist.d.ts index 7ee8e2c..244fee4 100644 --- a/typings/persist.d.ts +++ b/typings/persist.d.ts @@ -1,4 +1,4 @@ -import { Action, Store } from './store' +import { Action, Store } from './store.js' export interface PersistOptions { // name sets the state key to use, useful in development to avoid conflict @@ -19,7 +19,7 @@ export interface PersistOptions { setItem(name: string, value: string): void } - // filter predicate allows control over whether to persist state based on + // filter predicate allows control over whether to persist state based on // the action. Default is to trigger persistence after all actions filter: (action: Action) => boolean @@ -36,4 +36,4 @@ export interface PersistOptions { // TODO: version for updates, expiry etc... } -export declare function persist(store: T, options?: Partial>): T \ No newline at end of file +export declare function persist(store: T, options?: Partial>): T diff --git a/typings/routing.d.ts b/typings/routing.d.ts index d0f3ccd..cc66283 100644 --- a/typings/routing.d.ts +++ b/typings/routing.d.ts @@ -1,7 +1,7 @@ import { Result, Matcher } from "@captaincodeman/router" -import { Model } from "./model" -import { Plugin } from './modelStore' +import { Model } from "./model.js" +import { Plugin } from './modelStore.js' type RoutingReducers = { change: (state: any, payload: RoutingState) => RoutingState diff --git a/typings/thunk.d.ts b/typings/thunk.d.ts index dbb61d3..d808af1 100644 --- a/typings/thunk.d.ts +++ b/typings/thunk.d.ts @@ -1,5 +1,5 @@ -import { Dispatch, GetState, Store } from './store' +import { Dispatch, GetState, Store } from './store.js' export type ThunkAction = (dispatch: Dispatch, getState: GetState) => void -export declare function thunk(store: T): T \ No newline at end of file +export declare function thunk(store: T): T