2.3.0
https://jsfiddle.net/7syt1bdu/
When writing router.push({name: 'xx', params: {id: 2}} TS will complain about the type is not right.
Problem free TS compilation :-)
TS error
adding this to types/router.d.ts, fix the issue :
export interface LocationObject {
name?: string,
path?: string,
params?: Object
query?: Object
}
export type RawLocation = string | Location | LocationObject;
A PR would be even better 馃檪
Ok, i make the PR danse 馃榿
Location params and query may only hold string values, and I passed along a number. Sorry, move on ... nothing to see :-)
Most helpful comment
Location
paramsandquerymay only hold string values, and I passed along a number. Sorry, move on ... nothing to see :-)