user %!s(int64=6) %!d(string=hai) anos
pai
achega
c19174f48b
Modificáronse 2 ficheiros con 31 adicións e 30 borrados
  1. 16 15
      lib/content-item.d.ts
  2. 15 15
      src/content-item.ts

+ 16 - 15
lib/content-item.d.ts

@@ -1,20 +1,21 @@
+import { ContentLink } from "./content-link";
 import { ContentParams } from "./content-params";
 export declare class ContentItem {
-    data: ContentParams;
-    private hash;
-    private type;
-    private myTagsWithoutAll;
-    private allLinks;
-    private userLinks;
-    private systemLinks;
-    private repliable;
-    private price?;
-    private priceFormatted?;
-    private fromTarget?;
-    private toTarget?;
-    private fromContactId?;
-    private toContactId?;
-    private media?;
+    readonly data: ContentParams;
+    readonly hash: string;
+    readonly type: string;
+    readonly myTagsWithoutAll: string[];
+    readonly allLinks: ContentLink[];
+    readonly userLinks: ContentLink[];
+    readonly systemLinks: ContentLink[];
+    readonly repliable: boolean;
+    readonly price?: number;
+    readonly priceFormatted?: string;
+    readonly fromTarget?: string;
+    readonly toTarget?: string;
+    readonly fromContactId?: string;
+    readonly toContactId?: string;
+    readonly media?: string;
     constructor(hash: string, props: ContentParams);
     private formatCents;
 }

+ 15 - 15
src/content-item.ts

@@ -3,23 +3,23 @@ import { ContentParams } from "./content-params";
 
 export class ContentItem {
 
-  public data: ContentParams;
-  private hash: string;
-  private type: string;
+  public readonly data: ContentParams;
+  public readonly hash: string;
+  public readonly type: string;
   
-  private myTagsWithoutAll: string[];
-  private allLinks: ContentLink[];
-  private userLinks: ContentLink[];
-  private systemLinks: ContentLink[];
-  private repliable: boolean;
+  public readonly myTagsWithoutAll: string[];
+  public readonly allLinks: ContentLink[];
+  public readonly userLinks: ContentLink[];
+  public readonly systemLinks: ContentLink[];
+  public readonly repliable: boolean;
 
-  private price?: number;
-  private priceFormatted?: string;
-  private fromTarget?: string;
-  private toTarget?: string;
-  private fromContactId?: string;
-  private toContactId?: string;
-  private media?: string;
+  public readonly price?: number;
+  public readonly priceFormatted?: string;
+  public readonly fromTarget?: string;
+  public readonly toTarget?: string;
+  public readonly fromContactId?: string;
+  public readonly toContactId?: string;
+  public readonly media?: string;
   
   constructor(hash: string, props: ContentParams) {
     this.data = props;