Fixed typescript strict issue of Statusbar, hostedUtils, StringUtils etc (#785)

This commit is contained in:
Sunil Kumar Yadav
2021-07-15 20:05:51 +05:30
committed by GitHub
parent 0bbf9de963
commit 397231dca2
8 changed files with 20 additions and 14 deletions

View File

@@ -40,7 +40,7 @@ export function getDatabaseAccountKindFromExperience(apiExperience: typeof userC
return AccountKind.GlobalDocumentDB;
}
export function extractMasterKeyfromConnectionString(connectionString: string): string {
export function extractMasterKeyfromConnectionString(connectionString: string): string | undefined {
// Only Gremlin uses the actual master key for connection to cosmos
const matchedParts = connectionString.match("AccountKey=(.*);ApiKind=Gremlin;$");
return (matchedParts && matchedParts.length > 1 && matchedParts[1]) || undefined;