mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-05-31 09:36:17 +00:00
Migrated more common components to TS
This commit is contained in:
@@ -27,3 +27,6 @@ export type SelectedServer = RegularServer | NotFoundServer | null;
|
||||
|
||||
export const hasServerData = (server: ServerData | NotFoundServer | null): server is ServerData =>
|
||||
!!(server as ServerData)?.url && !!(server as ServerData)?.apiKey;
|
||||
|
||||
export const isReachableServer = (server: SelectedServer): server is ReachableServer =>
|
||||
!!server?.hasOwnProperty('printableVersion');
|
||||
|
||||
Reference in New Issue
Block a user