From 35c09dd7baaaae01808025370ff072be07e24279 Mon Sep 17 00:00:00 2001 From: Stefan Thomas Date: Mon, 23 Sep 2024 10:50:47 -0400 Subject: [PATCH] docs: [no-duplicate-type-constituents] clarify that this rule does not conflict with `exactOptionalPropertyTypes` --- .../eslint-plugin/docs/rules/no-duplicate-type-constituents.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/eslint-plugin/docs/rules/no-duplicate-type-constituents.mdx b/packages/eslint-plugin/docs/rules/no-duplicate-type-constituents.mdx index e254a6ca4c3e..37a1e36e6217 100644 --- a/packages/eslint-plugin/docs/rules/no-duplicate-type-constituents.mdx +++ b/packages/eslint-plugin/docs/rules/no-duplicate-type-constituents.mdx @@ -19,6 +19,8 @@ For example, given `type A = string` and `type T = string | A`, this rule would This rule also disallows explicitly listing `undefined` in a type union when a function parameter is marked as optional. Doing so is unnecessary. +Please note that this check only applies to parameters, not properties. +Therefore, it does not conflict with the [`exactOptionalPropertyTypes`](https://www.typescriptlang.org/tsconfig/#exactOptionalPropertyTypes) TypeScript compiler setting. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy