fix: update type & imports (#3638)
This pr is small fixed that update type declaration and import from codebase.
This commit is contained in:
@@ -83,7 +83,7 @@ export class Context<State> {
|
|||||||
data: unknown = undefined;
|
data: unknown = undefined;
|
||||||
/** Error value if an error was caught (Default: null) */
|
/** Error value if an error was caught (Default: null) */
|
||||||
error: unknown | null = null;
|
error: unknown | null = null;
|
||||||
readonly info: Deno.ServeHandlerInfo | Deno.ServeHandlerInfo;
|
readonly info: Deno.ServeHandlerInfo;
|
||||||
/**
|
/**
|
||||||
* Whether the current Request is a partial request.
|
* Whether the current Request is a partial request.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -2,9 +2,8 @@ import type { AnyComponent } from "preact";
|
|||||||
import type { MaybeLazy, Route, RouteConfig } from "./types.ts";
|
import type { MaybeLazy, Route, RouteConfig } from "./types.ts";
|
||||||
import type { HandlerByMethod, RouteHandler } from "./handlers.ts";
|
import type { HandlerByMethod, RouteHandler } from "./handlers.ts";
|
||||||
import type { Middleware } from "./middlewares/mod.ts";
|
import type { Middleware } from "./middlewares/mod.ts";
|
||||||
import type { AsyncAnyComponent } from "./render.ts";
|
import type { AsyncAnyComponent, PageProps } from "./render.ts";
|
||||||
import { type HandlerFn, isHandlerByMethod } from "./handlers.ts";
|
import { type HandlerFn, isHandlerByMethod } from "./handlers.ts";
|
||||||
import type { PageProps } from "./render.ts";
|
|
||||||
import {
|
import {
|
||||||
type Command,
|
type Command,
|
||||||
CommandType,
|
CommandType,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
|
HOLE,
|
||||||
INFINITY_NEG,
|
INFINITY_NEG,
|
||||||
INFINITY_POS,
|
INFINITY_POS,
|
||||||
NAN,
|
NAN,
|
||||||
@@ -6,7 +7,6 @@ import {
|
|||||||
UNDEFINED,
|
UNDEFINED,
|
||||||
ZERO_NEG,
|
ZERO_NEG,
|
||||||
} from "./constants.ts";
|
} from "./constants.ts";
|
||||||
import { HOLE } from "./constants.ts";
|
|
||||||
|
|
||||||
export type Stringifiers = Record<
|
export type Stringifiers = Record<
|
||||||
string,
|
string,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export interface RouteResult<T> {
|
|||||||
|
|
||||||
export interface Router<T> {
|
export interface Router<T> {
|
||||||
add(
|
add(
|
||||||
method: Method | "OPTIONS" | "ALL",
|
method: Method | "ALL",
|
||||||
pathname: string,
|
pathname: string,
|
||||||
handlers: T[],
|
handlers: T[],
|
||||||
): void;
|
): void;
|
||||||
|
|||||||
Reference in New Issue
Block a user