Skip to content

Commit 85843e8

Browse files
PowerKiKiatscott
authored andcommitted
fix(common): allow to specify only some properties of DatePipeConfig (#51287)
The code already supports `DatePipeConfig` to have only some properties set, and not all. But the typing disallows it. This aligns the typing with the code. PR Close #51287
1 parent 7dde42a commit 85843e8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

goldens/public-api/common/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ export class DatePipe implements PipeTransform {
141141
// @public
142142
export interface DatePipeConfig {
143143
// (undocumented)
144-
dateFormat: string;
144+
dateFormat?: string;
145145
// (undocumented)
146-
timezone: string;
146+
timezone?: string;
147147
}
148148

149149
// @public

packages/common/src/pipes/date_pipe_config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
* @publicApi
1616
*/
1717
export interface DatePipeConfig {
18-
dateFormat: string;
19-
timezone: string;
18+
dateFormat?: string;
19+
timezone?: string;
2020
}
2121

2222
/**

0 commit comments

Comments
 (0)