Repository: angular/angular
File: packages/router/src/router.ts (TypeScript)

Code before:
    } catch (e) {
      this.console.warn(
        formatRuntimeError(
          RuntimeErrorCode.ERROR_PARSING_URL,
          ngDevMode && `Error parsing URL ${url}. Falling back to '/' instead. \n` + e,
        ),
      );
      return this.urlSerializer.parse('/');
    }
  }

  /**
   * Returns whether the url is activated.
   *
   * @deprecated
   * Use `IsActiveMatchOptions` instead.
   *
   * - The equivalent `IsActiveMatchOptions` for `true` is
   * `{paths: 'exact', queryParams: 'exact', fragment: 'ignored', matrixParams: 'ignored'}`.
   * - The equivalent for `false` is
   * `{paths: 'subset', queryParams: 'subset', fragment: 'ignored', matrixParams: 'ignored'}`.
   */
  isActive(url: string | UrlTree, exact: boolean): boolean;
  /**
   * Returns whether the url is activated.
   * @deprecated 21.1.0 - Use the `isActive` function instead.
   * @see {@link isActive}
   */
  isActive(url: string | UrlTree, matchOptions: IsActiveMatchOptions): boolean;
  /** @internal */
  isActive(url: string | UrlTree, matchOptions: boolean | IsActiveMatchOptions): boolean;
  /**
   * @deprecated 21.1.0 - Use the `isActive` function instead.
   * @see {@link isActive}
   */
  isActive(url: string | UrlTree, matchOptions: boolean | IsActiveMatchOptions): boolean {
    let options: IsActiveMatchOptions;
    if (matchOptions === true) {
      options = {...exactMatchOptions};
    } else if (matchOptions === false) {
      options = {...subsetMatchOptions};
    } else {
      options = matchOptions;
    }
    if (isUrlTree(url)) {
      return containsTree(this.currentUrlTree, url, options);
    }

    const urlTree = this.parseUrl(url);
    return containsTree(this.currentUrlTree, urlTree, options);
  }

Review comment (suggestion):
nit
```suggestion
   * @deprecated 21.1 - Use the `isActive` function instead.
```

Code after:
    } catch (e) {
      this.console.warn(
        formatRuntimeError(
          RuntimeErrorCode.ERROR_PARSING_URL,
          ngDevMode && `Error parsing URL ${url}. Falling back to '/' instead. \n` + e,
        ),
      );
      return this.urlSerializer.parse('/');
    }
  }

  /**
   * Returns whether the url is activated.
   *
   * @deprecated
   * Use `IsActiveMatchOptions` instead.
   *
   * - The equivalent `IsActiveMatchOptions` for `true` is
   * `{paths: 'exact', queryParams: 'exact', fragment: 'ignored', matrixParams: 'ignored'}`.
   * - The equivalent for `false` is
   * `{paths: 'subset', queryParams: 'subset', fragment: 'ignored', matrixParams: 'ignored'}`.
   */
  isActive(url: string | UrlTree, exact: boolean): boolean;
  /**
   * Returns whether the url is activated.
   * @deprecated 21.1 - Use the `isActive` function instead.
   * @see {@link isActive}
   */
  isActive(url: string | UrlTree, matchOptions: IsActiveMatchOptions): boolean;
  /** @internal */
  isActive(url: string | UrlTree, matchOptions: boolean | IsActiveMatchOptions): boolean;
  /**
   * @deprecated 21.1 - Use the `isActive` function instead.
   * @see {@link isActive}
   */
  isActive(url: string | UrlTree, matchOptions: boolean | IsActiveMatchOptions): boolean {
    let options: IsActiveMatchOptions;
    if (matchOptions === true) {
      options = {...exactMatchOptions};
    } else if (matchOptions === false) {
      options = {...subsetMatchOptions};
    } else {
      options = matchOptions;
    }
    if (isUrlTree(url)) {
      return containsTree(this.currentUrlTree, url, options);
    }

    const urlTree = this.parseUrl(url);
    return containsTree(this.currentUrlTree, urlTree, options);
  }