Open whitetrefoil opened 6 years ago
See the conflicts I just realized a big part of this PR has already been merged many days before (but I forget it). It just has not been published to NPM.
I'll take care of the conflict.
As conversation above about importing vue-router
, this PR seems to have no use.
void
is a change too small to cause any change to user.I can decline this PR. But I still suggest to release a version on the previous commit.
I have bumped dep version locally. It seems webpack/ts-loader related deps have changed how declaration files emit. @whitetrefoil I guess updating deps breaks the build.
"declarationDir": "dist",
in tsconfig.json
should fix the build process.
Great. I will update dependency.
@whitetrefoil can you pull the master branch and add Error
to nextFunc
? I think this pull request does improve the typing.
Hi @HerringtonDarkholme,
This may need your help for a careful review and/or a local test (since it is a major change).
next()
FunctionAccording to the latest document, all
next()
function can be:next()
next(false)
next(RawLocation)
next(Error)
And for the
beforeRouteEnter
lifecycle, it has one more form:The type of
vm
here isthis
, the instance of current Component. But I failed to find a way to set it automatically. So I have to use a generic type (manually):vue-router
& Other NPM UpdatesAs your previous comment, I tried to import the router related types from the official
vue-router
package. But if I usenpm run compile
then install it as dependency in my other local project, it caused a lot of type error (mostly about type ofVue
).Finally I did a clean update of NPM packages, now the errors have disappeared. But I didn't found the exact cause of this problem.