Skip to content

Commit

Permalink
fixup! client: Add more type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
jtojnar committed Aug 6, 2023
1 parent 014b1a4 commit fef103e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions client/js/model/Configuration.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { createContext } from 'react';

export const ConfigurationContext = createContext();

export type Configuration = {
homepage: string,
share: string,
Expand All @@ -27,3 +25,5 @@ export type Configuration = {
userCss: number | null,
userJs: number | null,
};

export const ConfigurationContext: React.Context<Configuration> = createContext(undefined);
2 changes: 1 addition & 1 deletion client/js/requests/items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export function getItems(filter: QueryFilter, abortController?: AbortController)
}

type StatusUpdate = {
id: int,
id: number,
unread?: boolean,
starred?: boolean,
datetime: Date,
Expand Down
8 changes: 4 additions & 4 deletions client/js/requests/sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { TagWithUnread } from './tags';
import * as ajax from '../helpers/ajax';

type SourceWithUnread = {
id: int,
id: number,
title: string,
unread: int,
unread: number,
};

type UpdateResponse = {
Expand Down Expand Up @@ -110,14 +110,14 @@ type Spout = {
};

type SourceWithIcon = {
id: int,
id: number,
title: string,
tags: Array<string>,
spout: string,
params: object,
filter: string | null,
error: string | null,
lastentry: int | null,
lastentry: number | null,
icon: string | null
};

Expand Down

0 comments on commit fef103e

Please sign in to comment.