Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public static async getConnection(): Promise {
let defaultusername = await Config.getDefaultUsername();
const connection = await sfcore.Connection.create({
authInfo: await sfcore.AuthInfo.create({ username: defaultusername})
});
return connection;
}