Skip to content

Typescript support #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 35 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ec27178
Start TypeScript support and add a declaration file
nickserv Apr 24, 2018
6c046f3
Update lock
nickserv Apr 24, 2018
d88eedc
Rename source files to TS
nickserv Apr 25, 2018
0eb7cf8
Ignore JS files in TS
nickserv Apr 25, 2018
35ff851
Move types to source files to fix errors
nickserv Apr 25, 2018
b076c1b
Add ts-jest
nickserv Apr 25, 2018
536e58d
Move ts-jest to dev
nickserv Apr 25, 2018
8798ce5
Use TypeScript for test files
nickserv Apr 27, 2018
4977e67
Merge branch 'master' into typescript
nickserv Apr 27, 2018
db3dbfc
Remove extra import
nickserv Apr 27, 2018
5c39427
Update lock
nickserv Apr 27, 2018
9fdb323
Run type TypeScript compiler directly to check test files
nickserv Apr 27, 2018
fefdd62
Update to TypeScript 3 for tooling and syntax improvements
nickserv Aug 26, 2018
df298e0
Restore VM test with Node types
nickserv Aug 26, 2018
e258113
Fix incorrect TypeScript version in Rollup
nickserv Aug 26, 2018
21d8bf6
Clean up extra types compared to master branch
nickserv Aug 26, 2018
4e98f42
Update Redux for more accurate types
nickserv Aug 26, 2018
e4b8f7c
Rename entry file to be a declaration file
nickserv Aug 26, 2018
5988e9e
Remove extra babel-jest dependency
nickserv Aug 28, 2018
5ebaca8
Move noEmit to tsconfig
nickserv Aug 28, 2018
2904ed7
Use TypeScript through Babel 7
nickserv Aug 28, 2018
e6b766a
Improve type safety with strict: true
nickserv Aug 29, 2018
310a779
Minor syntax merge
nickserv Aug 29, 2018
e26bc8f
Do not allow ImpureReducer's state argument to be undefined
nickserv Aug 30, 2018
0d8cecc
Merge branch 'master' into typescript
nickserv Aug 30, 2018
05934e0
Merge branch 'master' into typescript
nickserv Sep 6, 2018
1dddf37
Update lock file
nickserv Sep 7, 2018
a9c1748
Improve type safety of actions
nickserv Sep 7, 2018
e298b2a
Remove extra packages
nickserv Sep 7, 2018
6c446fa
Revert "Remove extra packages"
nickserv Sep 7, 2018
74428d2
Remove unnecessary ignores
nickserv Sep 7, 2018
f721d9f
Update package lock
nickserv Sep 7, 2018
b5f6f0c
Emit declaration files into dist
nickserv Sep 7, 2018
6c668eb
Set up entry file for TS declarations
nickserv Sep 7, 2018
b1342a5
Fix entry path
nickserv Sep 7, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
{
"presets": [
[
"env",
{
"modules": false
}
]
],
"env": {
"development": {
"plugins": ["external-helpers"]
},
"test": {
"plugins": ["transform-es2015-modules-commonjs"]
}
}
"presets": ["@babel/env", "@babel/typescript"],
"plugins": ["@babel/proposal-class-properties"]
}
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
module.exports = {
extends: 'react-app',

parser: 'typescript-eslint-parser',
rules: {
'jsx-a11y/href-no-hash': 'off'
'jsx-a11y/href-no-hash': 'off',
'no-undef': 'off',
'no-unused-vars': 'off'
}
}
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
.DS_Store
*.log
node_modules
dist
lib
es


.idea/
dist
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

The `redux-starter-kit` package is intended to help address three common complaints about Redux:

- "Configuring a Redux store is too complicated"
- "I have to add a lot of packages to get Redux to do anything useful"
- "Redux requires too much boilerplate code"
* "Configuring a Redux store is too complicated"
* "I have to add a lot of packages to get Redux to do anything useful"
* "Redux requires too much boilerplate code"

We can't solve every use case, but in the spirit of [`create-react-app`](https://github.com/facebook/create-react-app) and [`apollo-boost`](https://dev-blog.apollodata.com/zero-config-graphql-state-management-27b1f1b3c2c3), we can try to provide some tools that abstract over the setup process and handle the most common use cases, as well as include some useful utilities that will let the user simplify their application code.

Expand All @@ -23,9 +23,9 @@ This package is _not_ intended to solve every possible complaint about Redux, an

`redux-starter-kit` includes:

- A `configureStore()` function with simplified configuration options. It can automatically combine your slice reducers, adds whatever Redux middleware you supply, includes `redux-thunk` by default, and enables use of the Redux DevTools Extension.
- A `createReducer()` utility that lets you supply a lookup table of action types to case reducer functions, rather than writing switch statements. In addition, it automatically uses the [`immer` library](https://github.com/mweststrate/immer) to let you write simpler immutable updates with normal mutative code, like `state.todos[3].completed = true`.
- An improved version of the widely used `createSelector` utility for creating memoized selector functions, which can accept string keypaths as "input selectors" (re-exported from the [`selectorator` library](https://github.com/planttheidea/selectorator)).
* A `configureStore()` function with simplified configuration options. It can automatically combine your slice reducers, adds whatever Redux middleware you supply, includes `redux-thunk` by default, and enables use of the Redux DevTools Extension.
* A `createReducer()` utility that lets you supply a lookup table of action types to case reducer functions, rather than writing switch statements. In addition, it automatically uses the [`immer` library](https://github.com/mweststrate/immer) to let you write simpler immutable updates with normal mutative code, like `state.todos[3].completed = true`.
* An improved version of the widely used `createSelector` utility for creating memoized selector functions, which can accept string keypaths as "input selectors" (re-exported from the [`selectorator` library](https://github.com/planttheidea/selectorator)).

### API Reference

Expand Down
Loading