Add TypeScript annotations
This commit is contained in:
parent
e0483329fa
commit
efd0338a33
|
@ -111,7 +111,7 @@ export class Search extends Component<any, State> {
|
|||
)
|
||||
}
|
||||
|
||||
sortLink(sortKey) {
|
||||
sortLink(sortKey: string) {
|
||||
return (
|
||||
<span>
|
||||
<a href={this.buildSortURL(sortKey)}>
|
||||
|
@ -122,7 +122,7 @@ export class Search extends Component<any, State> {
|
|||
)
|
||||
}
|
||||
|
||||
buildSortURL(sortKey) {
|
||||
buildSortURL(sortKey: string) {
|
||||
const searchParams = this.state.searchParams;
|
||||
let page, sortDir;
|
||||
if (sortKey === searchParams.sort_key) {
|
||||
|
@ -135,7 +135,7 @@ export class Search extends Component<any, State> {
|
|||
return `/#/search/${searchParams.type_}/${searchParams.q}/${page}/${sortKey}/${sortDir}`;
|
||||
}
|
||||
|
||||
sortLinkIcon(sortKey) {
|
||||
sortLinkIcon(sortKey: string) {
|
||||
const searchParams = this.state.searchParams;
|
||||
|
||||
if (searchParams.sort_key !== sortKey) {
|
||||
|
|
Loading…
Reference in New Issue