doers-comms-types 1.0.2 → 1.0.4

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.
@@ -4,8 +4,8 @@ export declare class Tweet {
4
4
  readonly url: string;
5
5
  readonly tweet_time: string;
6
6
  readonly tweet_content: string;
7
- readonly replying_to: string[];
8
7
  readonly quote?: string;
8
+ readonly html: string;
9
9
  constructor(tweet: any);
10
10
  static is(tweet: any): tweet is Tweet;
11
11
  }
@@ -4,8 +4,8 @@ export class Tweet {
4
4
  url;
5
5
  tweet_time;
6
6
  tweet_content;
7
- replying_to;
8
7
  quote;
8
+ html;
9
9
  constructor(tweet) {
10
10
  if (!Tweet.is(tweet)) {
11
11
  throw Error("Invalid input.");
@@ -15,8 +15,8 @@ export class Tweet {
15
15
  this.url = tweet.url;
16
16
  this.tweet_time = tweet.tweet_time;
17
17
  this.tweet_content = tweet.tweet_content;
18
- this.replying_to = tweet.replying_to;
19
18
  this.quote = tweet.quote;
19
+ this.html = tweet.html;
20
20
  }
21
21
  static is(tweet) {
22
22
  return (tweet !== undefined &&
@@ -26,7 +26,7 @@ export class Tweet {
26
26
  typeof tweet.tweet_time === "string" &&
27
27
  typeof tweet.tweet_content === "string" &&
28
28
  Array.isArray(tweet.replying_to) &&
29
- tweet.replying_to.every((username) => typeof username === "string") &&
30
- (tweet.quote === undefined || typeof tweet.quote === "string"));
29
+ (tweet.quote === undefined || typeof tweet.quote === "string") &&
30
+ (typeof tweet.html === "string"));
31
31
  }
32
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doers-comms-types",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
@@ -4,8 +4,8 @@ export class Tweet {
4
4
  readonly url : string
5
5
  readonly tweet_time : string
6
6
  readonly tweet_content : string
7
- readonly replying_to : string[]
8
7
  readonly quote? : string
8
+ readonly html : string
9
9
 
10
10
  constructor(tweet : any) {
11
11
  if (!Tweet.is(tweet)) {
@@ -16,8 +16,8 @@ export class Tweet {
16
16
  this.url = tweet.url
17
17
  this.tweet_time = tweet.tweet_time
18
18
  this.tweet_content = tweet.tweet_content
19
- this.replying_to = tweet.replying_to
20
19
  this.quote = tweet.quote
20
+ this.html = tweet.html
21
21
  }
22
22
 
23
23
  static is(tweet : any) : tweet is Tweet {
@@ -29,8 +29,8 @@ export class Tweet {
29
29
  typeof tweet.tweet_time === "string" &&
30
30
  typeof tweet.tweet_content === "string" &&
31
31
  Array.isArray(tweet.replying_to) &&
32
- tweet.replying_to.every((username : any) => typeof username === "string") &&
33
- (tweet.quote === undefined || typeof tweet.quote === "string")
32
+ (tweet.quote === undefined || typeof tweet.quote === "string") &&
33
+ (typeof tweet.html === "string")
34
34
  )
35
35
  }
36
36
  }