Merge branch 'ts-redux' into 'develop'
TS Redux See merge request soapbox-pub/soapbox-fe!1098
This commit is contained in:
commit
04960163c7
10 changed files with 33 additions and 15 deletions
|
@ -26,6 +26,9 @@ lint-js:
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- "**/*.js"
|
- "**/*.js"
|
||||||
|
- "**/*.jsx"
|
||||||
|
- "**/*.ts"
|
||||||
|
- "**/*.tsx"
|
||||||
- ".eslintignore"
|
- ".eslintignore"
|
||||||
- ".eslintrc.js"
|
- ".eslintrc.js"
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
import { composeWithDevTools } from '@redux-devtools/extension';
|
import { composeWithDevTools } from '@redux-devtools/extension';
|
||||||
import { createStore, applyMiddleware } from 'redux';
|
import { createStore, applyMiddleware, AnyAction } from 'redux';
|
||||||
import thunk from 'redux-thunk';
|
import thunk, { ThunkDispatch } from 'redux-thunk';
|
||||||
|
|
||||||
import errorsMiddleware from './middleware/errors';
|
import errorsMiddleware from './middleware/errors';
|
||||||
import soundsMiddleware from './middleware/sounds';
|
import soundsMiddleware from './middleware/sounds';
|
||||||
|
@ -20,4 +20,4 @@ export const store = createStore(
|
||||||
// Infer the `RootState` and `AppDispatch` types from the store itself
|
// Infer the `RootState` and `AppDispatch` types from the store itself
|
||||||
// https://redux.js.org/usage/usage-with-typescript
|
// https://redux.js.org/usage/usage-with-typescript
|
||||||
export type RootState = ReturnType<typeof store.getState>;
|
export type RootState = ReturnType<typeof store.getState>;
|
||||||
export type AppDispatch = typeof store.dispatch;
|
export type AppDispatch = ThunkDispatch<{}, {}, AnyAction>;
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
"@tabler/icons": "^1.53.0",
|
"@tabler/icons": "^1.53.0",
|
||||||
"@types/escape-html": "^1.0.1",
|
"@types/escape-html": "^1.0.1",
|
||||||
"@types/http-link-header": "^1.0.3",
|
"@types/http-link-header": "^1.0.3",
|
||||||
"@types/redux-immutable": "^4.0.2",
|
"@types/lodash": "^4.14.180",
|
||||||
"array-includes": "^3.0.3",
|
"array-includes": "^3.0.3",
|
||||||
"autoprefixer": "^10.0.0",
|
"autoprefixer": "^10.0.0",
|
||||||
"axios": "^0.21.4",
|
"axios": "^0.21.4",
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"allowSyntheticDefaultImports": true
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"typeRoots": [ "./types", "./node_modules/@types"]
|
||||||
},
|
},
|
||||||
"exclude": ["**/*.test.*", "**/__mocks__/*", "**/__tests__/*"]
|
"exclude": ["node_modules", "types", "**/*.test.*", "**/__mocks__/*", "**/__tests__/*"]
|
||||||
}
|
}
|
||||||
|
|
17
types/redux-immutable/index.d.ts
vendored
Normal file
17
types/redux-immutable/index.d.ts
vendored
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
// Type definitions for redux-immutable v4.0.0
|
||||||
|
// Project: https://github.com/gajus/redux-immutable
|
||||||
|
// Definitions by: Sebastian Sebald <https://github.com/sebald>
|
||||||
|
// Gavin Gregory <https://github.com/gavingregory>
|
||||||
|
// Kanitkorn Sujautra <https://github.com/lukyth>
|
||||||
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||||
|
// TypeScript Version: 2.3
|
||||||
|
|
||||||
|
declare module 'redux-immutable' {
|
||||||
|
import { Collection, Record as ImmutableRecord } from 'immutable';
|
||||||
|
import { ReducersMapObject, Reducer, Action } from 'redux';
|
||||||
|
|
||||||
|
export function combineReducers<S, A extends Action, T>(reducers: ReducersMapObject<S, A>, getDefaultState?: () => Collection.Keyed<T, S>): Reducer<S, A>;
|
||||||
|
export function combineReducers<S, A extends Action>(reducers: ReducersMapObject<S, A>, getDefaultState?: () => Collection.Indexed<S>): Reducer<S, A>;
|
||||||
|
export function combineReducers<S>(reducers: ReducersMapObject<S, any>, getDefaultState?: () => Collection.Indexed<S>): Reducer<S>;
|
||||||
|
export function combineReducers<S>(reducers: ReducersMapObject<S, any>, getDefaultState?: () => ImmutableRecord<any>): Reducer<S>;
|
||||||
|
}
|
15
yarn.lock
15
yarn.lock
|
@ -1911,6 +1911,11 @@
|
||||||
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
|
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
|
||||||
integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=
|
integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=
|
||||||
|
|
||||||
|
"@types/lodash@^4.14.180":
|
||||||
|
version "4.14.180"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.180.tgz#4ab7c9ddfc92ec4a887886483bc14c79fb380670"
|
||||||
|
integrity sha512-XOKXa1KIxtNXgASAnwj7cnttJxS4fksBRywK/9LzRV5YxrF80BXZIGeQSuoESQ/VkUj30Ae0+YcuHc15wJCB2g==
|
||||||
|
|
||||||
"@types/mdast@^3.0.0":
|
"@types/mdast@^3.0.0":
|
||||||
version "3.0.10"
|
version "3.0.10"
|
||||||
resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.10.tgz#4724244a82a4598884cbbe9bcfd73dff927ee8af"
|
resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.10.tgz#4724244a82a4598884cbbe9bcfd73dff927ee8af"
|
||||||
|
@ -1972,14 +1977,6 @@
|
||||||
"@types/scheduler" "*"
|
"@types/scheduler" "*"
|
||||||
csstype "^3.0.2"
|
csstype "^3.0.2"
|
||||||
|
|
||||||
"@types/redux-immutable@^4.0.2":
|
|
||||||
version "4.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/redux-immutable/-/redux-immutable-4.0.2.tgz#8c3c666c33130c6794280bc3dc7726bfa0cfacc7"
|
|
||||||
integrity sha512-nlnhJn9B+NtIemWnnNWO9arUioeHLNvYCADSSa+48c81y8VwutgHH3WHobX711KKrfhlMlEz3+Q9SYX3sxrYPg==
|
|
||||||
dependencies:
|
|
||||||
immutable "^4.0.0-rc.1"
|
|
||||||
redux "^4.0.0"
|
|
||||||
|
|
||||||
"@types/retry@^0.12.0":
|
"@types/retry@^0.12.0":
|
||||||
version "0.12.1"
|
version "0.12.1"
|
||||||
resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.1.tgz#d8f1c0d0dc23afad6dc16a9e993a0865774b4065"
|
resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.1.tgz#d8f1c0d0dc23afad6dc16a9e993a0865774b4065"
|
||||||
|
@ -5376,7 +5373,7 @@ immediate@~3.0.5:
|
||||||
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
|
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
|
||||||
integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=
|
integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=
|
||||||
|
|
||||||
immutable@^4.0.0, immutable@^4.0.0-rc.1:
|
immutable@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.0.0.tgz#b86f78de6adef3608395efb269a91462797e2c23"
|
resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.0.0.tgz#b86f78de6adef3608395efb269a91462797e2c23"
|
||||||
integrity sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==
|
integrity sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==
|
||||||
|
|
Loading…
Reference in a new issue