From 34eac94da3d2c5cf4c700f76ab0dc294b61bd02a Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Mon, 20 Jun 2022 21:27:02 +0530 Subject: [PATCH] Make everything optional Now typescript will force us to validate everything. --- src/platform/types/theme.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/platform/types/theme.ts b/src/platform/types/theme.ts index 3e587e30..1c8ee7c3 100644 --- a/src/platform/types/theme.ts +++ b/src/platform/types/theme.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -export type ThemeManifest = { +export type ThemeManifest = Partial<{ /** * Version number of the theme manifest. * This must be incremented when backwards incompatible changes are introduced. @@ -26,7 +26,7 @@ export type ThemeManifest = { * This is added to the manifest during the build process and includes data * that is needed to load themes at runtime. */ - source?: { + source: { /** * This is mapping from theme-id to location of css file relative to build-output root. * eg: {"element-light": "assets/theme-element-light.10f9bb22.css", ...} @@ -49,9 +49,9 @@ export type ThemeManifest = { */ variants: Record; }; -}; +}>; -type Variant = { +type Variant = Partial<{ /** * If true, this variant is used a default dark/light variant and will be the selected theme * when "Match system theme" is selected for this theme collection in settings. @@ -64,4 +64,4 @@ type Variant = { * eg: {"background-color-primary": "#21262b", ...} */ variables: Record; -} +}>;