-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Some lines of the generated .marko-run/routes.d.ts can be very long. This makes it wrap on small columns, and especially difficult to diff by a human.
Eg:
declare module "../src/routes/+layout.marko" {
export interface Input extends Run.LayoutInput<typeof import("../src/routes/+layout.marko")> {}
namespace MarkoRun {
export { NotHandled, NotMatched, GetPaths, PostPaths, GetablePath, GetableHref, PostablePath, PostableHref, Platform };
export type Route = Run.Routes["/aaaaa" | "/bbbbb" | "/ccccc" | "/ddddd" | "/eeeee" | "/fffff"];
export type Context = Run.MultiRouteContext<Route> & Marko.Global;
export type Handler = Run.HandlerLike<Route>;
/** @deprecated use `((context, next) => { ... }) satisfies MarkoRun.Handler` instead */
export const route: Run.HandlerTypeFn<Route>;
}
}
Could perhaps be written as:
declare module "../src/routes/+layout.marko" {
export interface Input
extends Run.LayoutInput<typeof import("../src/routes/+layout.marko")> {}
namespace MarkoRun {
export {
NotHandled,
NotMatched,
GetPaths,
PostPaths,
GetablePath,
GetableHref,
PostablePath,
PostableHref,
Platform,
};
export type Route = Run.Routes[
| "/aaaaa"
| "/bbbbb"
| "/ccccc"
| "/ddddd"
| "/eeeee"
| "/fffff"
];
export type Context = Run.MultiRouteContext<Route> & Marko.Global;
export type Handler = Run.HandlerLike<Route>;
/** @deprecated use `((context, next) => { ... }) satisfies MarkoRun.Handler` instead */
export const route: Run.HandlerTypeFn<Route>;
}
}
Metadata
Metadata
Assignees
Labels
No labels