Add TypeScript annotations

This commit is contained in:
Rob Watson 2020-07-04 08:40:58 +02:00
parent e0483329fa
commit efd0338a33
1 changed files with 3 additions and 3 deletions

View File

@ -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) {