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
Ideally we'll defer to DefinityTyped or get it merged into the project in question directly (unlikely given past dialogue angus-c/just#126). Up until now technical limitations have blocked this.
Closer, but a TS performance bail out occurs at 8 inputs.
// Type definitions for just-extend 4.1// Project: https://github.com/angus-c/just#readme// Definitions by: Peter Safranek <https://github.com/pe8ter>// Jordan Mele <https://github.com/Silic0nS0ldier>// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped// TypeScript Version: 4.1// Based on https://stackoverflow.com/a/49683575/4728587typeOptionalPropertyNames<T>={[KinkeyofT]-?: ({}extends{[PinK]: T[K]} ? K : never)}[keyofT];typeSpreadProperties<L,R,KextendskeyofL&keyofR>={[PinK]: L[P]|Exclude<R[P],undefined>};typeId<T>=Textends infer U ? {[KinkeyofU]: U[K]} : nevertypeSpreadTwo<L,R>=Id<&Pick<L,Exclude<keyofL,keyofR>>&Pick<R,Exclude<keyofR,OptionalPropertyNames<R>>>&Pick<R,Exclude<OptionalPropertyNames<R>,keyofL>>&SpreadProperties<L,R,OptionalPropertyNames<R>&keyofL>>;typeFilter1<T>=Textendsobject ? T : {};typeFilter2<T>=Textendsany[] ? {} : T;typeFilter<T>=Filter2<Filter1<T>>;typeSpread<Aextendsreadonly[...any]>=Aextends[infer L, ...infer R] ?
SpreadTwo<Filter<L>,Spread<R>> : unknown// caps out at 8 params, 9th results in TS bailoutdeclarefunctionextend<Aextendsany[]>(...a: [...A]): Spread<A>;// deep not implementedexport=extend;
Ideally we'll defer to DefinityTyped or get it merged into the project in question directly (unlikely given past dialogue angus-c/just#126). Up until now technical limitations have blocked this.
Potential answer may be found in https://stackoverflow.com/a/49683575/4728587 however.
The text was updated successfully, but these errors were encountered: