-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1012 from andrew-bierman/fix/linting-june16
🎨 linting
- Loading branch information
Showing
10 changed files
with
55 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
import { LinkComponent, Router, CreateParam } from './model'; | ||
export declare function Link(props: Parameters<LinkComponent>): ReturnType<LinkComponent>; | ||
export declare function Link( | ||
props: Parameters<LinkComponent>, | ||
): ReturnType<LinkComponent>; | ||
export declare const createParam: CreateParam; | ||
export declare function useRouter(): Router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,32 @@ | ||
import { FC } from 'react'; | ||
import { LinkProps } from 'solito/link'; | ||
export interface CreateParamOptions { | ||
initial?: string; | ||
parse?: (param: string) => unknown; | ||
stringify?: (param: unknown) => string; | ||
initial?: string; | ||
parse?: (param: string) => unknown; | ||
stringify?: (param: unknown) => string; | ||
} | ||
export interface Router { | ||
push: (url: URL) => void; | ||
replace: (url: URL) => void; | ||
back: () => void; | ||
push: (url: URL) => void; | ||
replace: (url: URL) => void; | ||
back: () => void; | ||
} | ||
export type LinkComponent = FC<LinkProps>; | ||
export type URL = string | { | ||
pathname?: string; | ||
query?: Record<string, any>; | ||
state?: Record<string, any>; | ||
hash?: string; | ||
as?: string | object; | ||
}; | ||
export type CreateParam = <T>() => { | ||
useParam: (key: keyof T, options?: CreateParamOptions) => [value: any, setValue: (value: any) => void]; | ||
useParams: (key: keyof T) => { | ||
params: T; | ||
setParams: (value: any) => void; | ||
export type URL = | ||
| string | ||
| { | ||
pathname?: string; | ||
query?: Record<string, any>; | ||
state?: Record<string, any>; | ||
hash?: string; | ||
as?: string | object; | ||
}; | ||
export type CreateParam = <T>() => { | ||
useParam: ( | ||
key: keyof T, | ||
options?: CreateParamOptions, | ||
) => [value: any, setValue: (value: any) => void]; | ||
useParams: (key: keyof T) => { | ||
params: T; | ||
setParams: (value: any) => void; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters