-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import type { Matcher } from './Matcher.js'; | ||
import type { MatchResult } from './MatchResult.js'; | ||
import type { Validator } from '../validators.js'; | ||
export interface QueryStringMatcherInput { | ||
req: { | ||
url: string; | ||
}; | ||
} | ||
type AnyValidator = Validator<string[], any>; | ||
type QueryMatch = Record<string, AnyValidator>; | ||
type QueryResult<T extends QueryMatch> = { | ||
[P in keyof T]: T[P] extends Validator<string[], infer O> ? O : never; | ||
}; | ||
export type QueryStringMatchResult<U extends QueryMatch> = MatchResult<{ | ||
query: QueryResult<U>; | ||
}>; | ||
declare class QueryStringMatcher<U extends QueryMatch, P extends QueryStringMatcherInput> implements Matcher<QueryStringMatchResult<U>, P> { | ||
private readonly listConfig; | ||
constructor(config: U); | ||
match: ({ req }: P) => QueryStringMatchResult<U>; | ||
} | ||
export declare function queryString<U extends QueryMatch, P extends QueryStringMatcherInput>(config: U): QueryStringMatcher<U, P>; | ||
export {}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {}; |