diff --git a/contributingGuides/STYLE.md b/contributingGuides/STYLE.md index 9c7073095e8a..22b1dea61bae 100644 --- a/contributingGuides/STYLE.md +++ b/contributingGuides/STYLE.md @@ -406,9 +406,11 @@ const sizingStyles = { mw100: { maxWidth: '100%', }, -} satisfies Record; +} as const satisfies Record; ``` +The example above results in the most narrow type possible, also the values are `readonly`. There are some cases in which that is not desired (e.g. the variable can be modified), if so `as const` should be omitted. + ### Type imports/exports Always use the `type` keyword when importing/exporting types