microsoft / microsoft/TypeScript
New Error: error TS2590: Expression produces a union type that is too complex to represent
Offen
@weswigham arbeitet bereits daran.
Seit 22.7.2021.
Needs Investigation
Rescheduled
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.4k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
Baseline: TS 4.3.2
Test: e0648173719f8f2a01d775e326d8590556bb16cd
New error: error TS2590: Expression produces a union type that is too complex to represent.
Dependencies
"@fluentui/react-northstar": "^0.56.0",
"@types/react": "^16.9.11"
tsconfig.json
{
"compilerOptions": {
"strictNullChecks": true,
"skipLibCheck": true,
"jsx": "react",
}
}
test.tsx
import { Alignment, ComponentSlotStylesPrepared, TeamsThemeStylesProps, ToolbarCustomItemProps, ToolbarItemProps } from "@fluentui/react-northstar";
import * as React from "react";
// No error if this is absent or at the end of the file
type Unused = ComponentSlotStylesPrepared<NonNullable<TeamsThemeStylesProps["ToolbarCustomItem"]>, any>;
type ItemProps = ToolbarItemProps | ToolbarCustomItemProps;
type ItemPropsWithTooltip = ItemProps & {
key?: string;
tooltip?: string;
tooltipAlign?: Alignment;
};
declare const ToolbarItem: React.ElementType<ItemPropsWithTooltip>;
declare const props: ItemPropsWithTooltip;
const { tooltip, key, tooltipAlign, ...rest } = props;
const _ = <ToolbarItem {...rest} />; // TS2590
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.