triangle-types 1.0.14 → 1.0.15
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.
|
@@ -3,10 +3,9 @@ export type ScoutTypeID = typeof scout_type_ids[number];
|
|
|
3
3
|
export declare function is_scout_type_id(scout_type_id: any): scout_type_id is ScoutTypeID;
|
|
4
4
|
export declare class Scout {
|
|
5
5
|
readonly scout_id: string;
|
|
6
|
-
readonly office_id: string;
|
|
7
|
-
readonly number: string;
|
|
8
|
-
readonly name: string;
|
|
9
6
|
readonly scout_type_id: ScoutTypeID;
|
|
7
|
+
readonly scout_num: number;
|
|
8
|
+
readonly name: string;
|
|
10
9
|
readonly [x: string]: any;
|
|
11
10
|
constructor(scout: any);
|
|
12
11
|
static is(scout: any): scout is Scout;
|
|
@@ -4,26 +4,23 @@ export function is_scout_type_id(scout_type_id) {
|
|
|
4
4
|
}
|
|
5
5
|
export class Scout {
|
|
6
6
|
scout_id;
|
|
7
|
-
office_id;
|
|
8
|
-
number;
|
|
9
|
-
name;
|
|
10
7
|
scout_type_id;
|
|
8
|
+
scout_num;
|
|
9
|
+
name;
|
|
11
10
|
constructor(scout) {
|
|
12
11
|
if (!Scout.is(scout)) {
|
|
13
12
|
throw Error("Invalid input.");
|
|
14
13
|
}
|
|
15
|
-
this.office_id = scout.office_id;
|
|
16
|
-
this.number = scout.number;
|
|
17
14
|
this.scout_id = scout.scout_id;
|
|
18
|
-
this.name = scout.name;
|
|
19
15
|
this.scout_type_id = scout.scout_type_id;
|
|
16
|
+
this.scout_num = scout.scout_num;
|
|
17
|
+
this.name = scout.name;
|
|
20
18
|
}
|
|
21
19
|
static is(scout) {
|
|
22
20
|
return (scout !== undefined &&
|
|
23
|
-
typeof scout.office_id === "string" &&
|
|
24
|
-
typeof scout.number === "string" &&
|
|
25
21
|
typeof scout.scout_id === "string" &&
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
is_scout_type_id(scout.scout_type_id) &&
|
|
23
|
+
typeof scout.scout_num === "number" &&
|
|
24
|
+
typeof scout.name === "string");
|
|
28
25
|
}
|
|
29
26
|
}
|
package/package.json
CHANGED
package/src/types/scout/Scout.ts
CHANGED
|
@@ -8,31 +8,28 @@ export function is_scout_type_id(scout_type_id : any) : scout_type_id is ScoutTy
|
|
|
8
8
|
|
|
9
9
|
export class Scout {
|
|
10
10
|
readonly scout_id : string
|
|
11
|
-
readonly office_id : string
|
|
12
|
-
readonly number : string
|
|
13
|
-
readonly name : string
|
|
14
11
|
readonly scout_type_id : ScoutTypeID
|
|
12
|
+
readonly scout_num : number
|
|
13
|
+
readonly name : string
|
|
15
14
|
readonly [x : string] : any
|
|
16
15
|
|
|
17
16
|
constructor(scout : any) {
|
|
18
17
|
if (!Scout.is(scout)) {
|
|
19
18
|
throw Error("Invalid input.")
|
|
20
19
|
}
|
|
21
|
-
this.office_id = scout.office_id
|
|
22
|
-
this.number = scout.number
|
|
23
20
|
this.scout_id = scout.scout_id
|
|
24
|
-
this.name = scout.name
|
|
25
21
|
this.scout_type_id = scout.scout_type_id
|
|
22
|
+
this.scout_num = scout.scout_num
|
|
23
|
+
this.name = scout.name
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
static is(scout : any) : scout is Scout {
|
|
29
27
|
return (
|
|
30
28
|
scout !== undefined &&
|
|
31
|
-
typeof scout.office_id === "string" &&
|
|
32
|
-
typeof scout.number === "string" &&
|
|
33
29
|
typeof scout.scout_id === "string" &&
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
is_scout_type_id(scout.scout_type_id) &&
|
|
31
|
+
typeof scout.scout_num === "number" &&
|
|
32
|
+
typeof scout.name === "string"
|
|
36
33
|
)
|
|
37
34
|
}
|
|
38
35
|
}
|