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

Fix an invalid type definition #253

Merged
merged 2 commits into from Feb 12, 2019
Merged

Fix an invalid type definition #253

merged 2 commits into from Feb 12, 2019

Conversation

cometkim
Copy link
Contributor

First of all, Thank you for maintaining an awesome library project :)

Type error: A parameter initializer is only allowed in a function or constructor implementation.  TS2371

    62 |     S extends RouterRootState, Params extends { [K in keyof Params]?: string }
    63 |   >(path: string): matchSelectorFn<S, Params>;
  > 64 |   export function onLocationChanged(location: Location, action: RouterActionType, isFirstRendering: boolean = false)
       |                                                                                   ^
    65 |     : LocationChangeAction;
    66 | 
    67 |   export type Push = typeof push;

I've got this type error after bumping up dependency versions.

@cometkim cometkim changed the title Fix wrong type definition Fix wrong invalid definition Feb 11, 2019
@cometkim cometkim changed the title Fix wrong invalid definition Fix an invalid type definition Feb 11, 2019
@nikolay-borzov
Copy link

Caused by #248

@arthureggert
Copy link

Can we merge this?
My project build is failing because of this error.

@nikolay-borzov
Copy link

nikolay-borzov commented Feb 11, 2019

Can we merge this?
My project build is failing because of this error.

You can revert update and fix version until it's fixed

index.d.ts Outdated
@@ -61,7 +61,7 @@ declare module 'connected-react-router' {
export function createMatchSelector<
S extends RouterRootState, Params extends { [K in keyof Params]?: string }
>(path: string): matchSelectorFn<S, Params>;
export function onLocationChanged(location: Location, action: RouterActionType, isFirstRendering: boolean = false)
export function onLocationChanged(location: Location, action: RouterActionType, isFirstRendering: boolean)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be marked as optional parameter isFirstRendering?: boolean

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It needs to be optional.

@supasate
Copy link
Owner

@cometkim Can you address the comment? Then, I'll merge and release a patch.

@cometkim
Copy link
Contributor Author

Thanks, just addressed @goszczynskip 's comment

@supasate
Copy link
Owner

LGTM!

@supasate supasate merged commit fe7663e into supasate:master Feb 12, 2019
@supasate
Copy link
Owner

Released in 6.3.1. Thanks everyone!

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

Successfully merging this pull request may close these issues.

None yet

5 participants