Skip to content
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

redux-thunk and TypeScript 1.6 #6231

Closed
schlaup opened this issue Oct 10, 2015 · 7 comments
Closed

redux-thunk and TypeScript 1.6 #6231

schlaup opened this issue Oct 10, 2015 · 7 comments

Comments

@schlaup
Copy link

schlaup commented Oct 10, 2015

The definitions for redux-thunk do not seem to work with TypeScript 1.6.

From the test:

import thunk from 'redux-thunk';

Error: "thunk" is undefined

import * as thunk from 'redux-thunk';

the compiler complains at this line: (wrong type)

    applyMiddleware(thunk),

My workaround:

    import * as thunk from 'redux-thunk';
    ...
    applyMiddleware(<any> thunk),

does work.

My guess is a mixup of old commonjs style (default) exports and new ES6 modules.

@vvakame
Copy link
Member

vvakame commented Oct 12, 2015

please send a pull request. I'll review it.

@Strate
Copy link
Contributor

Strate commented Nov 2, 2015

Here is my redux-thunk definitions:

declare module 'redux-thunk' {
    import {MiddlewareArg} as Redux from 'redux'
    export default function(obj: MiddlewareArg): Function
}

@louy
Copy link
Contributor

louy commented Jan 5, 2016

You need to change it to this:

export = function(obj: MiddlewareArg): Function

and remove previous exports

@ghost
Copy link

ghost commented Jan 15, 2016

I've just ran into this issue. Any news on status?

@born2net
Copy link

+1
import * as thunk from 'redux-thunk';
...
applyMiddleware( thunk),
worked !!!!!

@HenrikBechmann
Copy link

I replaced the tsd-installed definition with this:

declare module 'redux-thunk' {
    import {MiddlewareArg} from 'redux'
    export default function(obj: MiddlewareArg): Function
}

using typescript 1.8.2, redux-thunk 2.0.1

mainline:

import thunk from 'redux-thunk'
...
const reduxRouterMiddleware = routerMiddleware(browserHistory)

const store = createStore(
    mainReducer,
    applyMiddleware(reduxRouterMiddleware, thunk)
)

that worked.

hanssens added a commit to hanssens/DefinitelyTyped that referenced this issue Jul 12, 2017
Conform changelog at https://www.highcharts.com/documentation/changelog, implemented the following changes:

- Added new option, plotOptions.column.crisp, to allow disabling crisp columns and subsequent rendering issues with densely packed items. Closes DefinitelyTyped#5755.
- Added new option, findNearestPointBy to declare how the tooltip searches for points. DefinitelyTyped#6231.

Ignored due to being implementation-only, or lack of documentation:

- Added !default statement to SASS variables for easier configuration. Closes DefinitelyTyped#6436.
- Refactored the Pane object to keep track of its own backgrounds, more decoupled from Axis.
ghost pushed a commit that referenced this issue Jul 17, 2017
* Implemented specs from Highcharts v5.0.0

Conform changelog at https://www.highcharts.com/documentation/changelog, implemented the following changes:

	- Added styled mode for optional separation of SVG and CSS.
	- Added responsive option set.
	- Added accessibility option set.
	- Added new function, Chart.update in order to update the chart options after render time.
	- Added new function, Chart.addCredits.
	- Added new function, Chart.title.update.
	- Added new function, Chart.credits.update.
	- Added new function, Legend.update.
	- Added new option, Renderer.definition.
	- Added new option, exporting.error for catching errors in offline exporting.
	- Added new option, exporting.libURL for use with offline exporting.
	- Added new option, pane.background.className.
	- Added new option, xAxis.className.
	- Added new option, xAxis.crosshair.className.
	- Added new option, plotOptions.series.dataLabels.className.
	- Added new option, plotOptions.series.className for styling individual series.
	- Added new option, xAxis.plotBands.className.
	- Added new option, xAxis.plotLines.className.
	- Added new option, plotOptions.series.zones.className.
	- Added new option, chart.colorCount for use in styled mode.
	- Added new option, defs for defining reusable elements in styled mode.
	- Added new option, tooltip.padding.
	- Added new option, series<line>.data.colorIndex for coloring points in styled mode.
	- Added new option, tooltip.split.
	- Added new option, chart.description for use with the accessibility module.
	- Added new option, chart.typeDescription for use with the accessibility module.
	- Added new option, xAxis.description for use with the accessibility module.
	- Added new option, plotOptions.series.description for use with the accessibility module.
	- Refactored build system to use ES6 imports and node-based build script.
	- Changed all default colors (except series data colors) to a simplified color scheme based on just a few shared colors.

Additional improvements (found throughout the documentation):

	- Changed reference from `color?: string` to `color?: Color` throughout the different Options objects (this broke Typescript intellisense before)
	- ChartObject.xAxis now accepts also a single AxisObject, as well as Array<AxisObject>
	- ChartObject.yAxis now accepts also a single AxisObject, as well as Array<AxisObject>
	- Important: a handful changes already implemented by community contributors are left alone

* Implemented specs from Highcharts 5.0.1 (2016-10-26)

Conform changelog at https://www.highcharts.com/documentation/changelog, implemented the following changes:
    - Added new options, axis.softMin and axis.softMax.

No further documentation linked on the following subjects/changes (= ignored):

	- Added Legend keyboard navigation to the accessibility module.
	- Added animation on hovering point markers.
	- Added offline PDF export support.

* Implemented Highcharts 5.0.3 (2016-11-18)

- Added new option, lang.numericSymbolMagnitude, to support numeric symbol shortening in Japanese, Korean and certain Chinese locales.
- Added new option, threshold, for solid gauge series.
- Added new CSS custom property, textOutline, and at the same time removed the textShadow shim. Closes #5849.

Ignored due to being implementation-only, or lack of documentation:

- Better implementation of the chart.pinchType option. Allow pinchType and zoomType to be set independently. When tooltip.followTouchMove is true, pinchType only applies to two-finger touches. Closes #5840.
- Changed the Highcharts.addEvent function to return a callback to be used to remove the same event.
- Implemented bubbles in the Boost module.
- Improved alignment of ticks on multiple axes by allowing ticks to be placed at less strict intervals.
- Refactored split tooltip connectors to use common callback shape instead.

* Highcharts 5.0.7 (2017-01-17)

- Added new option, global.timezone, as a convenient shortcut to timezones defined with moment.js.
- Changed the Highcharts.error function to handle strings.

Ignored due to being implementation-only, or lack of documentation:

- Added Legend keyboard navigation to accessibility module.
- Added chart render and predraw events needed by the new Boost module.
- Added optional redraw to drillToNode, related to #6180.
- Added support for marker.symbol setting on bubble charts.
- Changed the Highcharts.addEvent function to return a callback to be used to remove the same event.

* Highcharts 5.0.8 (2017-03-08)

Conform changelog at https://www.highcharts.com/documentation/changelog, implemented the following changes:

- Added animation on graph mouse over and mouse out.
- Added new option, solidgauge.rounded.
- Added support for relative chart.height as a percentage of the width. This allows for fixed aspect ratio.

Ignored due to being implementation-only, or lack of documentation:

- Added a refactored Boost module based on WebGL. Details and API to be announced.
- Added hooks so that users can define their own log axis conversion functions, and can advertise that the log axis should allow negative values.

* Highcharts 5.0.10 (2017-03-31)

Conform changelog at https://www.highcharts.com/documentation/changelog, implemented the following changes:

- Added new option, plotOptions.column.crisp, to allow disabling crisp columns and subsequent rendering issues with densely packed items. Closes #5755.
- Added new option, findNearestPointBy to declare how the tooltip searches for points. #6231.

Ignored due to being implementation-only, or lack of documentation:

- Added !default statement to SASS variables for easier configuration. Closes #6436.
- Refactored the Pane object to keep track of its own backgrounds, more decoupled from Axis.

* Fixed dtslint warnings and errors for CI

This fixes all tslint/dtslint errors, incl. historic errors. #vanity

- Fixed: Array type using 'Array<T>' is forbidden for simple types. Use 'T[]' instead.
- Fixed: Exceeds maximum line length of 200
- Fixed: trailing whitespace
- Fixed: missing semicolon
- Fixed: Consecutive blank lines are forbidden
- Fixed: non-arrow functions are forbidden
- Fixed: missing whitespace
- Fixed: Don't leave a blank line before/after '{' / '}'
- Fixed: Do not use 'var'
@orta orta closed this as completed Jun 7, 2021
@orta
Copy link
Collaborator

orta commented Jun 7, 2021

Hi thread, we're moving DefinitelyTyped to use GitHub Discussions for conversations the @types modules in DefinitelyTyped.

To help with the transition, we're closing all issues which haven't had activity in the last 6 months, which includes this issue. If you think closing this issue is a mistake, please pop into the TypeScript Community Discord and mention the issue in the definitely-typed channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants