UNPKG

606 BPlain TextView Raw
1import Taro from '@tarojs/api'
2
3namespace Router {
4 export interface Location {
5 path: string;
6 search: string;
7 hash: string;
8 state: {
9 key: string;
10 };
11 params: {
12 [key: string]: string;
13 };
14 }
15 export interface RouterParams {
16 path: string;
17 scene: number;
18 params: {
19 [key: string]: string;
20 };
21 shareTicket: string;
22 referrerInfo: Record<string, any>;
23 }
24}
25
26interface TaroH5 {
27 _$router: Router.Location
28 $router: Router.RouterParams
29}
30
31const TaroH5: (TaroH5 & typeof Taro) = {} as any
32export default TaroH5