File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 1
1
import * as i18next from 'i18next' ;
2
2
3
+ interface CookieOptions {
4
+ maxAge ?: number ;
5
+ expires ?: Date ;
6
+ httpOnly ?: boolean ;
7
+ path ?: string ;
8
+ domain ?: string ;
9
+ secure ?: boolean ;
10
+ sameSite ?: boolean | 'lax' | 'strict' | 'none' ;
11
+ }
12
+
3
13
interface DetectorOptions {
4
14
/**
5
15
* order and from where user language should be detected
@@ -29,12 +39,21 @@ interface DetectorOptions {
29
39
excludeCacheFor ?: string [ ] ;
30
40
31
41
/**
32
- * optional expire and domain for set cookie
42
+ * optional expire for set cookie
33
43
* @default 10
34
44
*/
35
45
cookieMinutes ?: number ;
46
+
47
+ /**
48
+ * optional domain for set cookie
49
+ */
36
50
cookieDomain ?: string ;
37
51
52
+ /**
53
+ * optional cookie options
54
+ */
55
+ cookieOptions ?: CookieOptions
56
+
38
57
/**
39
58
* optional htmlTag with lang attribute
40
59
* @default document.documentElement
You can’t perform that action at this time.
0 commit comments