You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * @deprecated Use `Exclude` provided by TypeScript instead. */exportdeclaretypeDiff<Textendskeyofany,Uextendskeyofany>=({[PinT]: P;}&{[PinU]: never;}&{[x: string]: never;})[T];/** * @deprecated Use the version provided by TypeScript instead. */exportdeclaretypeOmit<U,KextendskeyofU>=Pick<U,Diff<keyofU,K>>;exportdeclaretypeDeepPartial<T>={[PinkeyofT]?: T[P]extends(infer U)[] ? DeepPartial<U>[] : T[P]extendsobject ? DeepPartial<T[P]> : T[P];};exportdeclaretypeIStyleFunction<TStylesProps,TStyleSetextendsIStyleSet<TStyleSet>>=(props: TStylesProps)=>DeepPartial<TStyleSet>;/** * Represents either a style function that takes in style props and returns a partial styleset, * or a partial styleset object. * {@docCategory IStyleFunctionOrObject} */exportdeclaretypeIStyleFunctionOrObject<TStylesProps,TStyleSetextendsIStyleSet<TStyleSet>>=IStyleFunction<TStylesProps,TStyleSet>|DeepPartial<TStyleSet>;exportinterfaceIRawStyle{/** * Allow css variables, strings, objects. While we should have more strict typing * here, partners are broken in many unpredictable cases where typescript can't infer * the right typing. Loosening the typing to both allow for css variables and other things. */[key: string]: any;/** * Display name for the style. */displayName?: string;/** * @deprecated - The selectors wrapper is no longer required. You may add selectors as siblings to other * style properties, like most css-in-js libraries support. */selectors?: {[key: string]: IStyle;};}exportdeclaretypeIStyleBase=IRawStyle|string|false|null|undefined;/** * {@docCategory IStyleBaseArray} */exportinterfaceIStyleBaseArrayextendsArray<IStyle>{}/** * IStyleObject extends a raw style objects, but allows selectors to be defined * under the selectors node. * @public * {@docCategory IStyle} */exportdeclaretypeIStyle=IStyleBase|IStyleBaseArray;exportdeclaretypeIStyleSet<TStyleSetextendsIStyleSet<TStyleSet>={[key: string]: any;}>={[PinkeyofOmit<TStyleSet,'subComponentStyles'>]: IStyle;}&{subComponentStyles?: {[PinkeyofTStyleSet['subComponentStyles']]: IStyleFunctionOrObject<any,any>;};};
🙁 Actual behavior
Type 'IStyleSet' is not generic.
Type 'IStyleSet' is not generic.
Type alias 'IStyleSet' circularly references itself.
Type parameter 'TStyleSet' has a circular constraint.
Type 'IStyleSet' is not generic.
Type parameter 'P' has a circular constraint.
Type 'string' does not satisfy the constraint 'keyof TStyleSet'.
Type '"subComponentStyles"' cannot be used to index type 'TStyleSet'.
🙂 Expected behavior
No errors
Additional information about the issue
I'm using @fluentui/merge-styles with version 8.5.15. This ships with the provided types above. This worked before Typescript version 5.1. Commenting out the custom Omit fixes the issue. However, I cannot change the code and cannot upgrade to a newer version right now.
The text was updated successfully, but these errors were encountered:
🔎 Search Terms
types regression not generic
🕗 Version & Regression Information
⏯ Playground Link
https://www.typescriptlang.org/play/?ts=5.1.6#code/PQKhCgAIUgBATApgBwE6IMYEMAuj6QCqAzopAAYCiAHhgDYCuS5kaA9gG4CWSBARgE9IAFQHJEAZQyouyHJC4A7YnizwAdFBDBwiasjap5SelnSQcYsgBEuAMzsAeYZD15F8YpADWiAWztILEUBABoiV2p3Tx8-AKCQgD5IAF5IAAoAbyhIXIBtAAUFRREAXQAuSAKAbnAAX0gAMkhs3PyipSIKyEVEDkRUWobm1ra86kqVGUUAc27e-sH6gEo84VLa0AhoOCQ0TFx8IlILAAsyReIuNhL2bl5IQRErKRk5YpVENU1oHT0DIyQEx0MxkSziSAAeQAtlwcI5COEANKRaJeXz+QKEZJpApcDDeBHhWwORwY+KIyBIxKJWq6fSGYyYEHmcE2RAoApmHBcLB0Zw4lo5drFWKYsoAfkqwkKpVRiA8XnSSjsAyIqzlEsg1g5yC5Rl5-OxeTl0tl8sVkDYfAAVph5FqdZzuYbnLLkmaCht6nT-oygczQRYrJAAJISSx0RAAMQYigwPJuzgjAijxAKqDYyGI4WEKajEkQ8jcCpi4cjkiLyYrhZwNNSGXY2el+cQ6cz2eWqWSTr1Lr51dTlbrmzAWkgACUUOhSIocF5EHDzqggpAVEPIHY4wnriUcKdcBYsL4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HAeQRFiIkVInRsixqlEURWQSu4qLYXhI1cIjVVIWUTj6IAA
💻 Code
🙁 Actual behavior
Type 'IStyleSet' is not generic.
Type 'IStyleSet' is not generic.
Type alias 'IStyleSet' circularly references itself.
Type parameter 'TStyleSet' has a circular constraint.
Type 'IStyleSet' is not generic.
Type parameter 'P' has a circular constraint.
Type 'string' does not satisfy the constraint 'keyof TStyleSet'.
Type '"subComponentStyles"' cannot be used to index type 'TStyleSet'.
🙂 Expected behavior
No errors
Additional information about the issue
I'm using @fluentui/merge-styles with version 8.5.15. This ships with the provided types above. This worked before Typescript version 5.1. Commenting out the custom Omit fixes the issue. However, I cannot change the code and cannot upgrade to a newer version right now.
The text was updated successfully, but these errors were encountered: