File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 66
77- add syndication and owner information
88
9+ ## 4.43.2
10+
11+ ### Patch Changes
12+
13+ - MaybePromise for getPublicationDate and getDisplayDate
14+
915## 4.43.1
1016
1117### Patch Changes
Original file line number Diff line number Diff line change @@ -115,15 +115,15 @@ export abstract class Document<ANS extends ANSContent> {
115115 return date . toISOString ( ) ;
116116 }
117117
118- protected getDisplayDate ( ) : Optional < Date > {
118+ protected getDisplayDate ( ) : MaybePromise < Optional < Date > > {
119119 return new Date ( ) ;
120120 }
121121
122122 protected async getContentElements ( ) : Promise < ArcTypes . ContentElements . ContentElementType < any > [ ] > {
123123 return [ ] ;
124124 }
125125
126- protected getPublicationDate ( ) : Optional < Date > {
126+ protected getPublicationDate ( ) : MaybePromise < Optional < Date > > {
127127 return new Date ( ) ;
128128 }
129129
Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ export abstract class Story<ANS extends ANSContent = Types.Story.AStory> extends
2828 const id = await this . arcId ( ) ;
2929 const version = this . version ( ) ;
3030 const type = this . type ( ) ;
31- const publicationDate = this . getPublicationDate ( ) ;
31+ const publicationDate = await this . getPublicationDate ( ) ;
32+ const displayDate = await this . getDisplayDate ( ) ;
3233 const headlines = this . getHeadlines ( ) ;
3334 const subheadlines = this . getSubheadlines ( ) ;
3435 const description = this . getDescription ( ) ;
@@ -78,7 +79,7 @@ export abstract class Story<ANS extends ANSContent = Types.Story.AStory> extends
7879 created_date : this . formatDate ( new Date ( ) ) ,
7980 first_publish_date : this . formatDate ( publicationDate ) ,
8081 publish_date : this . formatDate ( publicationDate ) ,
81- display_date : this . formatDate ( this . getDisplayDate ( ) ) ,
82+ display_date : this . formatDate ( displayDate ) ,
8283 source,
8384 comments,
8485 owner,
You can’t perform that action at this time.
0 commit comments