mirror of
https://github.com/1f349/admin.1f349.com.git
synced 2025-02-23 14:04:59 +00:00
12 lines
394 B
TypeScript
12 lines
394 B
TypeScript
export type CSPair<T> = {client: T; server: T} | CSPairNotC<T> | CSPairNotS<T>;
|
|
export type CSPairNotC<T> = {client: null; server: T};
|
|
export type CSPairNotS<T> = {client: T; server: null};
|
|
|
|
export function noCPair<T>(pair: CSPair<T>): pair is CSPairNotC<T> {
|
|
return pair.client == null;
|
|
}
|
|
|
|
export function noSPair<T>(pair: CSPair<T>): pair is CSPairNotS<T> {
|
|
return pair.server == null;
|
|
}
|