@stencil/router
Version: 
243 lines (222 loc) • 7.55 kB
TypeScript
/* tslint:disable */
/**
 * This is an autogenerated file created by the Stencil compiler.
 * It contains typing information for all components that exist in this project.
 */
import { HTMLStencilElement, JSXBase } from './stencil.core';
import {
  HistoryType,
  LocationSegments,
  MatchResults,
  Path,
  Prompt,
  RouteRenderProps,
  RouterHistory,
  RouteViewOptions,
} from './global/interfaces';
export namespace Components {
  interface StencilAsyncContent {
    'documentLocation'?: string;
  }
  interface StencilRoute {
    'component'?: string;
    'componentProps'?: { [key: string]: any };
    'componentUpdated'?: (options: RouteViewOptions) => void;
    'exact': boolean;
    'group': string | null;
    'history'?: RouterHistory;
    'historyType'?: HistoryType;
    'location'?: LocationSegments;
    'match': MatchResults | null;
    'routeRender'?: (props: RouteRenderProps) => any;
    'routeViewsUpdated'?: (options: RouteViewOptions) => void;
    'scrollTopOffset'?: number;
    'url'?: string | string[];
  }
  interface StencilRouteLink {
    'activeClass': string;
    'anchorClass'?: string;
    'anchorId'?: string;
    'anchorRole'?: string;
    'anchorTabIndex'?: string;
    'anchorTitle'?: string;
    'ariaHaspopup'?: string;
    'ariaLabel'?: string;
    'ariaPosinset'?: string;
    'ariaSetsize'?: number;
    /**
    * Custom tag to use instead of an anchor
    */
    'custom': string;
    'exact': boolean;
    'history'?: RouterHistory;
    'location'?: LocationSegments;
    'root'?: string;
    'strict': boolean;
    'url'?: string;
    'urlMatch'?: Path;
  }
  interface StencilRouteSwitch {
    'group': string;
    'location'?: LocationSegments;
    'routeViewsUpdated'?: (options: RouteViewOptions) => void;
    'scrollTopOffset'?: number;
  }
  interface StencilRouteTitle {
    'pageTitle': string;
    'titleSuffix': string;
  }
  interface StencilRouter {
    'historyType': HistoryType;
    'root': string;
    'scrollTopOffset'?: number;
    'titleSuffix': string;
  }
  interface StencilRouterPrompt {
    'history'?: RouterHistory;
    'message': string | Prompt;
    'when': boolean;
  }
  interface StencilRouterRedirect {
    'history'?: RouterHistory;
    'root'?: string;
    'url'?: string;
  }
}
declare global {
  interface HTMLStencilAsyncContentElement extends Components.StencilAsyncContent, HTMLStencilElement {}
  var HTMLStencilAsyncContentElement: {
    prototype: HTMLStencilAsyncContentElement;
    new (): HTMLStencilAsyncContentElement;
  };
  interface HTMLStencilRouteElement extends Components.StencilRoute, HTMLStencilElement {}
  var HTMLStencilRouteElement: {
    prototype: HTMLStencilRouteElement;
    new (): HTMLStencilRouteElement;
  };
  interface HTMLStencilRouteLinkElement extends Components.StencilRouteLink, HTMLStencilElement {}
  var HTMLStencilRouteLinkElement: {
    prototype: HTMLStencilRouteLinkElement;
    new (): HTMLStencilRouteLinkElement;
  };
  interface HTMLStencilRouteSwitchElement extends Components.StencilRouteSwitch, HTMLStencilElement {}
  var HTMLStencilRouteSwitchElement: {
    prototype: HTMLStencilRouteSwitchElement;
    new (): HTMLStencilRouteSwitchElement;
  };
  interface HTMLStencilRouteTitleElement extends Components.StencilRouteTitle, HTMLStencilElement {}
  var HTMLStencilRouteTitleElement: {
    prototype: HTMLStencilRouteTitleElement;
    new (): HTMLStencilRouteTitleElement;
  };
  interface HTMLStencilRouterElement extends Components.StencilRouter, HTMLStencilElement {}
  var HTMLStencilRouterElement: {
    prototype: HTMLStencilRouterElement;
    new (): HTMLStencilRouterElement;
  };
  interface HTMLStencilRouterPromptElement extends Components.StencilRouterPrompt, HTMLStencilElement {}
  var HTMLStencilRouterPromptElement: {
    prototype: HTMLStencilRouterPromptElement;
    new (): HTMLStencilRouterPromptElement;
  };
  interface HTMLStencilRouterRedirectElement extends Components.StencilRouterRedirect, HTMLStencilElement {}
  var HTMLStencilRouterRedirectElement: {
    prototype: HTMLStencilRouterRedirectElement;
    new (): HTMLStencilRouterRedirectElement;
  };
  interface HTMLElementTagNameMap {
    'stencil-async-content': HTMLStencilAsyncContentElement;
    'stencil-route': HTMLStencilRouteElement;
    'stencil-route-link': HTMLStencilRouteLinkElement;
    'stencil-route-switch': HTMLStencilRouteSwitchElement;
    'stencil-route-title': HTMLStencilRouteTitleElement;
    'stencil-router': HTMLStencilRouterElement;
    'stencil-router-prompt': HTMLStencilRouterPromptElement;
    'stencil-router-redirect': HTMLStencilRouterRedirectElement;
  }
}
declare namespace LocalJSX {
  interface StencilAsyncContent extends JSXBase.HTMLAttributes<HTMLStencilAsyncContentElement> {
    'documentLocation'?: string;
  }
  interface StencilRoute extends JSXBase.HTMLAttributes<HTMLStencilRouteElement> {
    'component'?: string;
    'componentProps'?: { [key: string]: any };
    'componentUpdated'?: (options: RouteViewOptions) => void;
    'exact'?: boolean;
    'group'?: string | null;
    'history'?: RouterHistory;
    'historyType'?: HistoryType;
    'location'?: LocationSegments;
    'match'?: MatchResults | null;
    'routeRender'?: (props: RouteRenderProps) => any;
    'routeViewsUpdated'?: (options: RouteViewOptions) => void;
    'scrollTopOffset'?: number;
    'url'?: string | string[];
  }
  interface StencilRouteLink extends JSXBase.HTMLAttributes<HTMLStencilRouteLinkElement> {
    'activeClass'?: string;
    'anchorClass'?: string;
    'anchorId'?: string;
    'anchorRole'?: string;
    'anchorTabIndex'?: string;
    'anchorTitle'?: string;
    'ariaHaspopup'?: string;
    'ariaLabel'?: string;
    'ariaPosinset'?: string;
    'ariaSetsize'?: number;
    /**
    * Custom tag to use instead of an anchor
    */
    'custom'?: string;
    'exact'?: boolean;
    'history'?: RouterHistory;
    'location'?: LocationSegments;
    'root'?: string;
    'strict'?: boolean;
    'url'?: string;
    'urlMatch'?: Path;
  }
  interface StencilRouteSwitch extends JSXBase.HTMLAttributes<HTMLStencilRouteSwitchElement> {
    'group'?: string;
    'location'?: LocationSegments;
    'routeViewsUpdated'?: (options: RouteViewOptions) => void;
    'scrollTopOffset'?: number;
  }
  interface StencilRouteTitle extends JSXBase.HTMLAttributes<HTMLStencilRouteTitleElement> {
    'pageTitle'?: string;
    'titleSuffix'?: string;
  }
  interface StencilRouter extends JSXBase.HTMLAttributes<HTMLStencilRouterElement> {
    'historyType'?: HistoryType;
    'root'?: string;
    'scrollTopOffset'?: number;
    'titleSuffix'?: string;
  }
  interface StencilRouterPrompt extends JSXBase.HTMLAttributes<HTMLStencilRouterPromptElement> {
    'history'?: RouterHistory;
    'message'?: string | Prompt;
    'when'?: boolean;
  }
  interface StencilRouterRedirect extends JSXBase.HTMLAttributes<HTMLStencilRouterRedirectElement> {
    'history'?: RouterHistory;
    'root'?: string;
    'url'?: string;
  }
  interface IntrinsicElements {
    'stencil-async-content': StencilAsyncContent;
    'stencil-route': StencilRoute;
    'stencil-route-link': StencilRouteLink;
    'stencil-route-switch': StencilRouteSwitch;
    'stencil-route-title': StencilRouteTitle;
    'stencil-router': StencilRouter;
    'stencil-router-prompt': StencilRouterPrompt;
    'stencil-router-redirect': StencilRouterRedirect;
  }
}
export { LocalJSX as JSX };
declare module "@stencil/core" {
  export namespace JSX {
    interface IntrinsicElements extends LocalJSX.IntrinsicElements {}
  }
}