forked from clerk/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmultiDomain.ts
More file actions
55 lines (51 loc) · 1.22 KB
/
Copy pathmultiDomain.ts
File metadata and controls
55 lines (51 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import type { ClerkOptions } from './clerk';
type StringOrURLFnToString = string | ((url: URL) => string);
/**
* You can configure proxy and satellite domains in a few ways:
*
* 1) none of them are set
* 2) only `proxyUrl` is set
* 3) `isSatellite` and `proxyUrl` are set
* 4) `isSatellite` and `domain` are set
*/
export type MultiDomainAndOrProxy =
| {
isSatellite?: never;
proxyUrl?: never | StringOrURLFnToString;
domain?: never;
}
| {
isSatellite: Exclude<ClerkOptions['isSatellite'], undefined>;
proxyUrl?: never;
domain: StringOrURLFnToString;
}
| {
isSatellite: Exclude<ClerkOptions['isSatellite'], undefined>;
proxyUrl: StringOrURLFnToString;
domain?: never;
};
export type MultiDomainAndOrProxyPrimitives =
| {
isSatellite?: never;
proxyUrl?: never | string;
domain?: never;
}
| {
isSatellite: boolean;
proxyUrl?: never;
domain: string;
}
| {
isSatellite: boolean;
proxyUrl: string;
domain?: never;
};
export type DomainOrProxyUrl =
| {
proxyUrl?: never;
domain?: StringOrURLFnToString;
}
| {
proxyUrl?: StringOrURLFnToString;
domain?: never;
};