The interface for a URL Rule

If you are creating a rule for use with UrlRulesApi.rule, it should implement this interface.

### Hierarchy

- UrlRule
  - MatcherUrlRule
  - RegExpRule

### Implemented by

- BaseUrlRule

## Index

### Properties

- $id
- handler
- match
- priority
- type

### Methods

- matchPriority

## Properties

$id: number

The rule's ID.

The rule's ID.

IDs are auto-assigned when the rule is registered, in increasing order.

- Defined in url/interface.ts:479

handler: UrlRuleHandlerFn

This function is called if the rule matched, and was selected as the "best match". This function handles the rule match event.

This function is called if the rule matched, and was selected as the "best match". This function handles the rule match event.

See UrlRuleHandlerFn for details

- Defined in url/interface.ts:505

match: UrlRuleMatchFn

This function should match the url and return the match details

This function should match the url and return the match details

See UrlRuleMatchFn for details

- Defined in url/interface.ts:497

priority: number

The rule's priority (defaults to 0).

The rule's priority (defaults to 0).

This can be used to explicitly modify the rule's priority. Higher numbers are higher priority.

- Defined in url/interface.ts:487

type: UrlRuleType

The type of the rule

The type of the rule

- Defined in url/interface.ts:490

## Methods

- matchPriority(match: any): number

- The priority of a given match.

- The priority of a given match.

  Sometimes more than one UrlRule might have matched. This method is used to choose the best match.

  If multiple rules matched, each rule's `matchPriority` is called with the value from match. The rule with the highest `matchPriority` has its handler called.

  #### Parameters

  - ##### match any

  #### Returns number

  - Defined in url/interface.ts:516

Generated using TypeDoc