Skip to content

Commit

Permalink
feat: Better TS support
Browse files Browse the repository at this point in the history
  • Loading branch information
MattCCC committed Aug 29, 2021
1 parent 127a5c4 commit 8aa16fd
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 169 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Please file an issue or make a PR if you spot any problems or you have any furth
- [Installation](#installation)
- [Usage & Examples](#usage-examples)
- [New hooks for pages](#new-hooks-for-pages)
- [TypeScript](#typescript)
- [API & Limitations](#api-limitations)
- [Troubleshooting](#troubleshooting)

Expand Down Expand Up @@ -175,6 +176,9 @@ export default {
| navigatedTo | `beforeRouteEnter` | To trigger it properly you need to access component instance. You can use `next(vm => ...)` callback within `beforeRouteEnter()`. Please check Vue-Router docs for more details. |
| navigatedFrom | - | This event is tricky to control for developers. There is no exact mapping of it in the router. For store state cleanup use build-in meta dispatcher instead. For component state you could opt for using `beforeRouteLeave()`. |

## TypeScript Support
If you need a TS support and it's not detected in your project for some reason, you can copy paste content of [typings/shims.vue.d.ts](https://github.com/MattCCC/nativescript-vue-router-extended/blob/master/src/typings/shims-vue.d.ts) file into your typings/ directory so to bring proper support in .vue files.

## API & Limitations

This plugin aims for compatibility with Vue Router 3+ and Vue Router 4+. Both should be easily supported. Please refer to [Vue Router Docs](https://next.router.vuejs.org/guide/) for more information. There are some obvious limitations like lack of DOM accessibility and related events, or lack of <router-link /> component.
Expand Down
Loading

0 comments on commit 8aa16fd

Please sign in to comment.