triangle-types 1.0.210 → 1.0.211

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.
@@ -16,6 +16,7 @@ export declare class TwitterTweet {
16
16
  readonly attachments_json?: string;
17
17
  readonly entities_json?: string;
18
18
  readonly reply_settings_type_id: string;
19
+ readonly vector?: number[];
19
20
  constructor(twitter_tweet: TwitterTweet);
20
21
  static is(twitter_tweet: any): twitter_tweet is TwitterTweet;
21
22
  }
@@ -16,6 +16,7 @@ export class TwitterTweet {
16
16
  attachments_json;
17
17
  entities_json;
18
18
  reply_settings_type_id;
19
+ vector;
19
20
  constructor(twitter_tweet) {
20
21
  if (!TwitterTweet.is(twitter_tweet)) {
21
22
  throw Error("Invalid input.");
@@ -37,6 +38,7 @@ export class TwitterTweet {
37
38
  this.attachments_json = twitter_tweet.attachments_json;
38
39
  this.entities_json = twitter_tweet.entities_json;
39
40
  this.reply_settings_type_id = twitter_tweet.reply_settings_type_id;
41
+ this.vector = twitter_tweet.vector;
40
42
  }
41
43
  static is(twitter_tweet) {
42
44
  return (twitter_tweet !== undefined &&
@@ -56,6 +58,7 @@ export class TwitterTweet {
56
58
  (twitter_tweet.media_json === undefined || typeof twitter_tweet.media_json === "string") &&
57
59
  (twitter_tweet.attachments_json === undefined || typeof twitter_tweet.attachments_json === "string") &&
58
60
  (twitter_tweet.entities_json === undefined || typeof twitter_tweet.entities_json === "string") &&
59
- typeof twitter_tweet.reply_settings_type_id === "string");
61
+ typeof twitter_tweet.reply_settings_type_id === "string" &&
62
+ (twitter_tweet.vector === undefined || Array.isArray(twitter_tweet.vector) && twitter_tweet.vector.every((coordinate) => typeof coordinate === "number")));
60
63
  }
61
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.210",
3
+ "version": "1.0.211",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -16,6 +16,7 @@ export class TwitterTweet {
16
16
  readonly attachments_json? : string
17
17
  readonly entities_json? : string
18
18
  readonly reply_settings_type_id : string
19
+ readonly vector? : number[]
19
20
 
20
21
  constructor(twitter_tweet : TwitterTweet) {
21
22
  if (!TwitterTweet.is(twitter_tweet)) {
@@ -38,6 +39,7 @@ export class TwitterTweet {
38
39
  this.attachments_json = twitter_tweet.attachments_json
39
40
  this.entities_json = twitter_tweet.entities_json
40
41
  this.reply_settings_type_id = twitter_tweet.reply_settings_type_id
42
+ this.vector = twitter_tweet.vector
41
43
  }
42
44
 
43
45
  static is(twitter_tweet : any) : twitter_tweet is TwitterTweet {
@@ -59,7 +61,8 @@ export class TwitterTweet {
59
61
  (twitter_tweet.media_json === undefined || typeof twitter_tweet.media_json === "string") &&
60
62
  (twitter_tweet.attachments_json === undefined || typeof twitter_tweet.attachments_json === "string") &&
61
63
  (twitter_tweet.entities_json === undefined || typeof twitter_tweet.entities_json === "string") &&
62
- typeof twitter_tweet.reply_settings_type_id === "string"
64
+ typeof twitter_tweet.reply_settings_type_id === "string" &&
65
+ (twitter_tweet.vector === undefined || Array.isArray(twitter_tweet.vector) && twitter_tweet.vector.every((coordinate : any) => typeof coordinate === "number"))
63
66
 
64
67
  )
65
68
  }