elections-types 1.1.17 → 1.1.19
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.
|
@@ -6,10 +6,12 @@ export declare class TwitterUser {
|
|
|
6
6
|
readonly description: string;
|
|
7
7
|
readonly location: string;
|
|
8
8
|
readonly create_time: string;
|
|
9
|
+
readonly affiliated_twitter_user_id?: string;
|
|
9
10
|
readonly is_protected: boolean;
|
|
11
|
+
readonly is_parody: boolean;
|
|
10
12
|
readonly subscription_type_id: string;
|
|
11
13
|
readonly verification_type_id: string;
|
|
12
|
-
readonly entities: string;
|
|
14
|
+
readonly entities: string | undefined;
|
|
13
15
|
constructor(twitter_user: TwitterUser);
|
|
14
16
|
static is(twitter_user: any): twitter_user is TwitterUser;
|
|
15
17
|
}
|
|
@@ -6,7 +6,9 @@ export class TwitterUser {
|
|
|
6
6
|
description;
|
|
7
7
|
location;
|
|
8
8
|
create_time;
|
|
9
|
+
affiliated_twitter_user_id;
|
|
9
10
|
is_protected;
|
|
11
|
+
is_parody;
|
|
10
12
|
subscription_type_id;
|
|
11
13
|
verification_type_id;
|
|
12
14
|
entities;
|
|
@@ -21,7 +23,9 @@ export class TwitterUser {
|
|
|
21
23
|
this.description = twitter_user.description;
|
|
22
24
|
this.location = twitter_user.location;
|
|
23
25
|
this.create_time = twitter_user.create_time;
|
|
26
|
+
this.affiliated_twitter_user_id = twitter_user.affiliated_twitter_user_id;
|
|
24
27
|
this.is_protected = twitter_user.is_protected;
|
|
28
|
+
this.is_parody = twitter_user.is_parody;
|
|
25
29
|
this.subscription_type_id = twitter_user.subscription_type_id;
|
|
26
30
|
this.verification_type_id = twitter_user.verification_type_id;
|
|
27
31
|
this.entities = twitter_user.entities;
|
|
@@ -35,9 +39,11 @@ export class TwitterUser {
|
|
|
35
39
|
typeof twitter_user.description === "string" &&
|
|
36
40
|
typeof twitter_user.location === "string" &&
|
|
37
41
|
typeof twitter_user.create_time === "string" &&
|
|
42
|
+
(twitter_user.affiliated_twitter_user_id === undefined || typeof twitter_user.affiliated_twitter_user_id == "string") &&
|
|
38
43
|
typeof twitter_user.is_protected === "boolean" &&
|
|
44
|
+
typeof twitter_user.is_parody === "boolean" &&
|
|
39
45
|
typeof twitter_user.subscription_type_id === "string" &&
|
|
40
46
|
typeof twitter_user.verification_type_id === "string" &&
|
|
41
|
-
typeof twitter_user.entities === "string");
|
|
47
|
+
(twitter_user.entities === undefined || typeof twitter_user.entities === "string"));
|
|
42
48
|
}
|
|
43
49
|
}
|
package/package.json
CHANGED
package/src/types/TwitterUser.ts
CHANGED
|
@@ -6,10 +6,12 @@ export class TwitterUser {
|
|
|
6
6
|
readonly description : string
|
|
7
7
|
readonly location : string
|
|
8
8
|
readonly create_time : string
|
|
9
|
+
readonly affiliated_twitter_user_id? : string
|
|
9
10
|
readonly is_protected : boolean
|
|
11
|
+
readonly is_parody : boolean
|
|
10
12
|
readonly subscription_type_id : string
|
|
11
13
|
readonly verification_type_id : string
|
|
12
|
-
readonly entities : string
|
|
14
|
+
readonly entities : string | undefined
|
|
13
15
|
|
|
14
16
|
constructor(twitter_user : TwitterUser) {
|
|
15
17
|
if (!TwitterUser.is(twitter_user)) {
|
|
@@ -22,7 +24,9 @@ export class TwitterUser {
|
|
|
22
24
|
this.description = twitter_user.description
|
|
23
25
|
this.location = twitter_user.location
|
|
24
26
|
this.create_time = twitter_user.create_time
|
|
27
|
+
this.affiliated_twitter_user_id = twitter_user.affiliated_twitter_user_id
|
|
25
28
|
this.is_protected = twitter_user.is_protected
|
|
29
|
+
this.is_parody = twitter_user.is_parody
|
|
26
30
|
this.subscription_type_id = twitter_user.subscription_type_id
|
|
27
31
|
this.verification_type_id = twitter_user.verification_type_id
|
|
28
32
|
this.entities = twitter_user.entities
|
|
@@ -38,10 +42,12 @@ export class TwitterUser {
|
|
|
38
42
|
typeof twitter_user.description === "string" &&
|
|
39
43
|
typeof twitter_user.location === "string" &&
|
|
40
44
|
typeof twitter_user.create_time === "string" &&
|
|
45
|
+
(twitter_user.affiliated_twitter_user_id === undefined || typeof twitter_user.affiliated_twitter_user_id == "string") &&
|
|
41
46
|
typeof twitter_user.is_protected === "boolean" &&
|
|
47
|
+
typeof twitter_user.is_parody === "boolean" &&
|
|
42
48
|
typeof twitter_user.subscription_type_id === "string" &&
|
|
43
49
|
typeof twitter_user.verification_type_id === "string" &&
|
|
44
|
-
typeof twitter_user.entities === "string"
|
|
50
|
+
(twitter_user.entities === undefined || typeof twitter_user.entities === "string")
|
|
45
51
|
)
|
|
46
52
|
}
|
|
47
53
|
}
|