Skip to content

Commit

Permalink
client: Fix return type
Browse files Browse the repository at this point in the history
  • Loading branch information
jtojnar committed Jul 30, 2023
1 parent 8a77c51 commit 9c2be5c
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion client/js/sharers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Configuration } from './model/Configuration';

type Sharer = {
label: string,
icon: string | JSX.Element,
icon: string | React.JSX.Element,
action: (params: { url: string, title: string }) => void,
available?: boolean,
};
Expand Down
10 changes: 5 additions & 5 deletions client/js/templates/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type MessageProps = {
*/
function Message(
props: MessageProps,
): JSX.Element | null {
): React.JSX.Element | null {
const {
message,
} = props;
Expand Down Expand Up @@ -109,7 +109,7 @@ function Message(
);
}

function NotFound(): JSX.Element {
function NotFound(): React.JSX.Element {
const location = useLocation();
const _ = useContext(LocalizationContext);
return (
Expand Down Expand Up @@ -174,7 +174,7 @@ type PureAppProps = {

function PureApp(
props: PureAppProps,
): JSX.Element {
): React.JSX.Element {
const {
navSourcesExpanded,
setNavSourcesExpanded,
Expand Down Expand Up @@ -777,7 +777,7 @@ export class App extends React.Component<AppProps, AppState> {
}


render(): JSX.Element {
render(): React.JSX.Element {
return (
<ConfigurationContext.Provider value={this.props.configuration}>
<LocalizationContext.Provider value={this._}>
Expand Down Expand Up @@ -815,7 +815,7 @@ export function createApp(
appRef: React.RefObject<App>,
configuration: Configuration,
},
): JSX.Element {
): React.JSX.Element {
const {
basePath,
appRef,
Expand Down
2 changes: 1 addition & 1 deletion client/js/templates/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type NavigationProps = {

export default function Navigation(
props: NavigationProps,
): JSX.Element {
): React.JSX.Element {
const {
entriesPage,
setNavExpanded,
Expand Down
4 changes: 2 additions & 2 deletions client/js/templates/OpmlImport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ type OpmlImportProps = {

export default function OpmlImport(
props: OpmlImportProps,
): JSX.Element {
): React.JSX.Element {
const {
setTitle,
} = props;

const [state, setState] = useState<LoadingState>(LoadingState.INITIAL);
const [message, setMessage] = useState<JSX.Element | null>(null);
const [message, setMessage] = useState<React.JSX.Element | null>(null);
const fileEntry = useRef<HTMLInputElement>(null);

const history = useHistory();
Expand Down
2 changes: 1 addition & 1 deletion client/js/templates/SourceParam.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type SourceParamProps = {

export default function SourceParam(
props: SourceParamProps,
): JSX.Element {
): React.JSX.Element {
const {
spoutParamName,
spoutParam,
Expand Down
2 changes: 1 addition & 1 deletion client/js/templates/SourcesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function loadSources({ abortController, location, setSpouts, setSources, setLoad
});
}

export default function SourcesPage(): JSX.Element {
export default function SourcesPage(): React.JSX.Element {
const [spouts, setSpouts] = useState([]);
const [sources, setSources] = useState([]);

Expand Down
4 changes: 2 additions & 2 deletions client/js/templates/Spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type SpinnerProps = {

export function Spinner(
props: SpinnerProps,
): JSX.Element {
): React.JSX.Element {
const {
label, size,
} = props;
Expand All @@ -34,7 +34,7 @@ type SpinnerBigProps = {

export function SpinnerBig(
props: SpinnerBigProps,
): JSX.Element {
): React.JSX.Element {
const {
label,
} = props;
Expand Down
4 changes: 2 additions & 2 deletions client/selfoss-sw-offline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { manifest, version } from '@parcel/service-worker';
// https://github.com/microsoft/TypeScript/issues/14877
declare const self: ServiceWorkerGlobalScope;

async function install(): Promise<undefined> {
async function install(): Promise<void> {
const cache = await caches.open(version);

const entriesToCache: string[] =
Expand All @@ -20,7 +20,7 @@ async function install(): Promise<undefined> {
self.addEventListener('install', (event: ExtendableEvent) => event.waitUntil(install()));


async function activate(): Promise<Array<boolean>> {
async function activate(): Promise<void> {
const keys = await caches.keys();
await Promise.all(
keys
Expand Down

0 comments on commit 9c2be5c

Please sign in to comment.