From 85843e8212e99deb8b70f3d3f8dfe002b978cbb1 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Mon, 7 Aug 2023 12:54:46 +0800 Subject: [PATCH] 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 --- goldens/public-api/common/index.md | 4 ++-- packages/common/src/pipes/date_pipe_config.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/goldens/public-api/common/index.md b/goldens/public-api/common/index.md index 4ee2eea8ca3..03d2494c13c 100644 --- a/goldens/public-api/common/index.md +++ b/goldens/public-api/common/index.md @@ -141,9 +141,9 @@ export class DatePipe implements PipeTransform { // @public export interface DatePipeConfig { // (undocumented) - dateFormat: string; + dateFormat?: string; // (undocumented) - timezone: string; + timezone?: string; } // @public diff --git a/packages/common/src/pipes/date_pipe_config.ts b/packages/common/src/pipes/date_pipe_config.ts index 54d15addba5..3ec75eff8ff 100644 --- a/packages/common/src/pipes/date_pipe_config.ts +++ b/packages/common/src/pipes/date_pipe_config.ts @@ -15,8 +15,8 @@ * @publicApi */ export interface DatePipeConfig { - dateFormat: string; - timezone: string; + dateFormat?: string; + timezone?: string; } /**