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
Is there an existing issue that is already proposing this?
I have searched the existing issues
Is your feature request related to a problem? Please describe it
If i used PassportStrategy as LocalStrategy, FacebookStrtegy....,
I can't use typesystem like autocomplete by ts in super();
exportclassLocalStrategyextendsPassportStrategys(Strategy){constructor(privateauthService: AuthService){super();// ts system not work!}}
// in passport.strategy.d.tsimport{Type}from'../interfaces';exportdeclarefunctionPassportStrategy<TextendsType<any>=any>(Strategy: T,name?: string|undefined): {new(...args: any[]): InstanceType<T>;// any is sad};
Describe the solution you'd like
It can use typesystem!
exportdeclarefunctionPassportStrategy<TextendsType<any>=any>(Strategy: T,name?: string,// undefined type is unnecessary): {new(...args: ConstructorParameters<T>): InstanceType<T>};// ConstructorParameters<> is Typescript default UtilityType
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
If i used PassportStrategy as LocalStrategy, FacebookStrtegy....,
I can't use typesystem like autocomplete by ts in super();
Describe the solution you'd like
It can use typesystem!
link: https://www.typescriptlang.org/docs/handbook/utility-types.html#constructorparameterstype
Teachability, documentation, adoption, migration strategy
we can just use same code but can use autocomplete, type check, prefix.......
What is the motivation / use case for changing the behavior?
The text was updated successfully, but these errors were encountered: