Skip to content

[IMP] redux-saga-routines: support version 3.1#34760

Merged
armanio123 merged 2 commits into
DefinitelyTyped:masterfrom
brainbeanapps:redux-saga-routines
Apr 17, 2019
Merged

[IMP] redux-saga-routines: support version 3.1#34760
armanio123 merged 2 commits into
DefinitelyTyped:masterfrom
brainbeanapps:redux-saga-routines

Conversation

@alexey-pelykh

Copy link
Copy Markdown
Contributor

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If adding a new definition:

  • The package does not already provide its own types, or cannot have its .d.ts files generated via --declaration
  • If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package.
  • Create it with dts-gen --dt, not by basing it on an existing project.
  • tslint.json should be present, and tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • Increase the version number in the header if appropriate.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }.

If removing a declaration:

  • If a package was never on DefinitelyTyped, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
  • Delete the package's directory.
  • Add it to notNeededPackages.json.

@alexey-pelykh

Copy link
Copy Markdown
Contributor Author

It appears that resolving typed of parameters (from 0 to 1-4 and to any number) does not work as expected.

@alexey-pelykh

Copy link
Copy Markdown
Contributor Author

Same approach has been used in 2.x version

@typescript-bot typescript-bot added the Unowned This PR touches a package that doesn't have any listed owners. label Apr 16, 2019
@typescript-bot

typescript-bot commented Apr 16, 2019

Copy link
Copy Markdown
Contributor

@alexey-pelykh Thank you for submitting this PR!

Because this PR doesn't have any code reviewers, a DefinitelyTyped maintainer will be reviewing it in the next few days once the Travis CI build passes.

In the meantime, if the build fails or a merge conflict occurs, I'll let you know. Have a nice day!

@typescript-bot

Copy link
Copy Markdown
Contributor

@alexey-pelykh The Travis CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@alexey-pelykh alexey-pelykh mentioned this pull request Apr 16, 2019
15 tasks
@StanislavVoronov

Copy link
Copy Markdown

I apply this changes locally
createRoutine(NAMESPACE, (id: string) => {
return { id };
});
but typings not apply to action: request and etc.
How should it work?

@alexey-pelykh

alexey-pelykh commented Apr 16, 2019

Copy link
Copy Markdown
Contributor Author

Typing is only applied in this way:

const routine = createRoutine(NAMESPACE, (id: string) => {
return { id };
});

routine('has to be string');
routine.trigger('has to be string');

request and etc are still loosely-typed

@alexey-pelykh alexey-pelykh force-pushed the redux-saga-routines branch 2 times, most recently from 6f85fbf to 749fd54 Compare April 16, 2019 11:08
@alexey-pelykh

Copy link
Copy Markdown
Contributor Author

Added some tests

@StanislavVoronov

Copy link
Copy Markdown

@alexey-pelykh maybe it should be strongly typed...

@alexey-pelykh

Copy link
Copy Markdown
Contributor Author

@StanislavVoronov maybe it should, I've added possibility to type those methods, yet 100% declaration would be enormous

@typescript-bot

typescript-bot commented Apr 16, 2019

Copy link
Copy Markdown
Contributor

@alexey-pelykh The Travis CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@alexey-pelykh

Copy link
Copy Markdown
Contributor Author

@StanislavVoronov I've added way to use typed request, but as said - not sure if you really would use that

@alexey-pelykh alexey-pelykh force-pushed the redux-saga-routines branch 2 times, most recently from c07392a to 6a56351 Compare April 16, 2019 16:20
@alexey-pelykh alexey-pelykh changed the title [FIX] redux-saga-routines: loosen type definitions [IMP] redux-saga-routines: support version 3.1 Apr 16, 2019
@armanio123 armanio123 merged commit 1717f56 into DefinitelyTyped:master Apr 17, 2019
@typescript-bot

Copy link
Copy Markdown
Contributor

I just published @types/redux-saga-routines@3.1.0 to npm.

alesn pushed a commit to alesn/DefinitelyTyped that referenced this pull request Apr 23, 2019
* [FIX] redux-saga-routines: loosen type definitions

* [IMP] redux-saga-routines: support 3.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Unowned This PR touches a package that doesn't have any listed owners.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants