Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@intlify/vue-router-bridge

Package Overview
Dependencies
Maintainers
2
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@intlify/vue-router-bridge - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0-1c66b25

55

lib/index.d.ts

@@ -8,3 +8,38 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

declare const VueRouter: any
// Stub VueRouter class interfaces
declare interface VueRouter {
app: Vue
options: RouterOptions
mode: RouterMode
currentRoute: Route
beforeEach(guard: NavigationGuard): Function
beforeResolve(guard: NavigationGuard): Function
afterEach(hook: (to: Route, from: Route) => any): Function
push(location: RawLocation): Promise<Route>
push(location: RawLocation, onComplete?: Function, onAbort?: ErrorHandler): void
replace(location: RawLocation): Promise<Route>
replace(location: RawLocation, onComplete?: Function, onAbort?: ErrorHandler): void
go(n: number): void
back(): void
forward(): void
match(raw: RawLocation, current?: Route, redirectedFrom?: Location): Route
getMatchedComponents(to?: RawLocation | Route): Component[]
onReady(cb: Function, errorCb?: ErrorHandler): void
onError(cb: ErrorHandler): void
addRoutes(routes: RouteConfig[]): void
AddRoute(parent: string, route: RouteConfig): void
AddRoute(route: RouteConfig): void
resolve(
to: RawLocation,
current?: Route,
append?: boolean
): {
location: Location
route: Route
href: string
normalizedTo: Location
resolved: Route
}
}
declare type ErrorHandler = (err: Error) => void
declare type RouterMode = 'hash' | 'history' | 'abstract'

@@ -39,3 +74,21 @@ declare type Dictionary<T> = { [key: string]: T }

}
declare type Vue = any // emulate Vue (v2)
declare type Component = any // emulate Vue Component (v2)
declare type Position = { x: number; y: number }
declare type PositionResult = Position | { selector: string; offset?: Position; behavior?: ScrollBehavior } | void
declare interface RouterOptions {
routes?: RouteConfig[]
mode?: RouterMode
fallback?: boolean
base?: string
linkActiveClass?: string
linkExactActiveClass?: string
parseQuery?: (query: string) => Record<string, any>
stringifyQuery?: (query: Record<string, any>) => string
scrollBehavior?: (
to: Route,
from: Route,
savedPosition: Position | void
) => PositionResult | Promise<PositionResult> | undefined | null
}
declare type RoutePropsFunction = (route: Route) => Record<string, anu>

@@ -42,0 +95,0 @@ declare interface _RouteConfigBase {

@@ -8,3 +8,38 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

declare const VueRouter: any
// Stub VueRouter class interfaces
declare interface VueRouter {
app: Vue
options: RouterOptions
mode: RouterMode
currentRoute: Route
beforeEach(guard: NavigationGuard): Function
beforeResolve(guard: NavigationGuard): Function
afterEach(hook: (to: Route, from: Route) => any): Function
push(location: RawLocation): Promise<Route>
push(location: RawLocation, onComplete?: Function, onAbort?: ErrorHandler): void
replace(location: RawLocation): Promise<Route>
replace(location: RawLocation, onComplete?: Function, onAbort?: ErrorHandler): void
go(n: number): void
back(): void
forward(): void
match(raw: RawLocation, current?: Route, redirectedFrom?: Location): Route
getMatchedComponents(to?: RawLocation | Route): Component[]
onReady(cb: Function, errorCb?: ErrorHandler): void
onError(cb: ErrorHandler): void
addRoutes(routes: RouteConfig[]): void
AddRoute(parent: string, route: RouteConfig): void
AddRoute(route: RouteConfig): void
resolve(
to: RawLocation,
current?: Route,
append?: boolean
): {
location: Location
route: Route
href: string
normalizedTo: Location
resolved: Route
}
}
declare type ErrorHandler = (err: Error) => void
declare type RouterMode = 'hash' | 'history' | 'abstract'

@@ -39,3 +74,21 @@ declare type Dictionary<T> = { [key: string]: T }

}
declare type Vue = any // emulate Vue (v2)
declare type Component = any // emulate Vue Component (v2)
declare type Position = { x: number; y: number }
declare type PositionResult = Position | { selector: string; offset?: Position; behavior?: ScrollBehavior } | void
declare interface RouterOptions {
routes?: RouteConfig[]
mode?: RouterMode
fallback?: boolean
base?: string
linkActiveClass?: string
linkExactActiveClass?: string
parseQuery?: (query: string) => Record<string, any>
stringifyQuery?: (query: Record<string, any>) => string
scrollBehavior?: (
to: Route,
from: Route,
savedPosition: Position | void
) => PositionResult | Promise<PositionResult> | undefined | null
}
declare type RoutePropsFunction = (route: Route) => Record<string, anu>

@@ -42,0 +95,0 @@ declare interface _RouteConfigBase {

10

package.json
{
"name": "@intlify/vue-router-bridge",
"version": "0.2.0",
"version": "0.3.0-1c66b25",
"description": "Vue Router bridging for Vue 2 & Vue 3",
"scripts": {
"postinstall": "node ./scripts/postinstall.js"
},
"peerDependencies": {

@@ -67,3 +64,6 @@ "@vue/composition-api": "^1.0.0-rc.1",

"access": "public"
},
"scripts": {
"postinstall": "node ./scripts/postinstall.js"
}
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc