callbackify | npm module : backwards compatibilify | REST library
kandi X-RAY | callbackify Summary
kandi X-RAY | callbackify Summary
backwards compatibilify your callback functions while migrating apis to promises.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of callbackify
callbackify Key Features
callbackify Examples and Code Snippets
Community Discussions
Trending Discussions on callbackify
QUESTION
I am trying to authenticate against active directory using passport-ldapauth in a Nestjs app. I don't have a service account and want to bind to Active Directory using a username as DN. I am trying to use the Asynchronous configuration retrieval but running into a problem when calling super() in the strategy class's constructor.
I get the following error:
src/ldap.strategy.ts:12:9 - error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. 12 super(this.getLdapConfig,
Any idea how I can make this work in a Nestjs app by extending the strategy interface/passing dynamic config method when calling super()?
my code:
...ANSWER
Answered 2020-Sep-22 at 13:45You could just extract getLdapConfig
to a const (arrow function) or regular function declared outside the class and then pass it into the super
call.
It doesn't reference any class members itself so there's no reason that it needs to be a class method.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install callbackify
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page