triangle-types 1.0.103 → 1.0.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ScoutAux } from "./Scout.js";
|
|
2
2
|
export declare class UserScout {
|
|
3
3
|
readonly user_scout_id: string;
|
|
4
4
|
readonly user_id: string;
|
|
5
5
|
readonly scout_id: string;
|
|
6
|
+
readonly is_conversation_allowed: boolean;
|
|
7
|
+
readonly is_search_allowed: boolean;
|
|
6
8
|
readonly [x: string]: any;
|
|
7
9
|
constructor(user_scout: any);
|
|
8
10
|
static is(user_scout: any): user_scout is UserScout;
|
|
9
11
|
}
|
|
10
12
|
export declare class UserScoutAux extends UserScout {
|
|
11
|
-
readonly scout:
|
|
13
|
+
readonly scout: ScoutAux;
|
|
12
14
|
constructor(user_scout: any);
|
|
13
15
|
static is(user_scout: any): user_scout is UserScoutAux;
|
|
14
16
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ScoutAux } from "./Scout.js";
|
|
2
2
|
export class UserScout {
|
|
3
3
|
user_scout_id;
|
|
4
4
|
user_id;
|
|
5
5
|
scout_id;
|
|
6
|
+
is_conversation_allowed;
|
|
7
|
+
is_search_allowed;
|
|
6
8
|
constructor(user_scout) {
|
|
7
9
|
if (!UserScout.is(user_scout)) {
|
|
8
10
|
throw Error("Invalid input.");
|
|
@@ -10,12 +12,16 @@ export class UserScout {
|
|
|
10
12
|
this.user_scout_id = user_scout.user_scout_id;
|
|
11
13
|
this.user_id = user_scout.user_id;
|
|
12
14
|
this.scout_id = user_scout.scout_id;
|
|
15
|
+
this.is_conversation_allowed = user_scout.is_conversation_allowed;
|
|
16
|
+
this.is_search_allowed = user_scout.is_search_allowed;
|
|
13
17
|
}
|
|
14
18
|
static is(user_scout) {
|
|
15
19
|
return (user_scout !== undefined &&
|
|
16
20
|
typeof user_scout.user_scout_id === "string" &&
|
|
17
21
|
typeof user_scout.user_id === "string" &&
|
|
18
|
-
typeof user_scout.scout_id === "string"
|
|
22
|
+
typeof user_scout.scout_id === "string" &&
|
|
23
|
+
typeof user_scout.is_conversation_allowed === "boolean" &&
|
|
24
|
+
typeof user_scout.is_search_allowed === "boolean");
|
|
19
25
|
}
|
|
20
26
|
}
|
|
21
27
|
export class UserScoutAux extends UserScout {
|
|
@@ -29,6 +35,6 @@ export class UserScoutAux extends UserScout {
|
|
|
29
35
|
}
|
|
30
36
|
static is(user_scout) {
|
|
31
37
|
return (UserScout.is(user_scout) &&
|
|
32
|
-
|
|
38
|
+
ScoutAux.is(user_scout.scout));
|
|
33
39
|
}
|
|
34
40
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { Scout } from "./Scout"
|
|
1
|
+
import { Scout, ScoutAux } from "./Scout"
|
|
2
2
|
|
|
3
3
|
export class UserScout {
|
|
4
4
|
readonly user_scout_id : string
|
|
5
5
|
readonly user_id : string
|
|
6
6
|
readonly scout_id : string
|
|
7
|
+
readonly is_conversation_allowed : boolean
|
|
8
|
+
readonly is_search_allowed : boolean
|
|
7
9
|
readonly [x : string] : any
|
|
8
10
|
|
|
9
11
|
constructor(user_scout : any) {
|
|
@@ -13,6 +15,8 @@ export class UserScout {
|
|
|
13
15
|
this.user_scout_id = user_scout.user_scout_id
|
|
14
16
|
this.user_id = user_scout.user_id
|
|
15
17
|
this.scout_id = user_scout.scout_id
|
|
18
|
+
this.is_conversation_allowed = user_scout.is_conversation_allowed
|
|
19
|
+
this.is_search_allowed = user_scout.is_search_allowed
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
static is(user_scout : any) : user_scout is UserScout {
|
|
@@ -20,13 +24,15 @@ export class UserScout {
|
|
|
20
24
|
user_scout !== undefined &&
|
|
21
25
|
typeof user_scout.user_scout_id === "string" &&
|
|
22
26
|
typeof user_scout.user_id === "string" &&
|
|
23
|
-
typeof user_scout.scout_id === "string"
|
|
27
|
+
typeof user_scout.scout_id === "string" &&
|
|
28
|
+
typeof user_scout.is_conversation_allowed === "boolean" &&
|
|
29
|
+
typeof user_scout.is_search_allowed === "boolean"
|
|
24
30
|
)
|
|
25
31
|
}
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
export class UserScoutAux extends UserScout {
|
|
29
|
-
readonly scout :
|
|
35
|
+
readonly scout : ScoutAux
|
|
30
36
|
|
|
31
37
|
constructor(user_scout : any) {
|
|
32
38
|
if (!UserScoutAux.is(user_scout)) {
|
|
@@ -39,7 +45,7 @@ export class UserScoutAux extends UserScout {
|
|
|
39
45
|
static is(user_scout : any) : user_scout is UserScoutAux {
|
|
40
46
|
return (
|
|
41
47
|
UserScout.is(user_scout) &&
|
|
42
|
-
|
|
48
|
+
ScoutAux.is(user_scout.scout)
|
|
43
49
|
)
|
|
44
50
|
}
|
|
45
51
|
}
|