fixed typescript strict of CqlUtilities.test.ts CapabilityUtils.ts file (#787)
Co-authored-by: Steve Faulkner <southpolesteve@gmail.com>
This commit is contained in:
parent
7dd8bd567f
commit
103b3bf6c9
|
@ -1,4 +1,5 @@
|
|||
export function getQuotedCqlIdentifier(identifier: string): string {
|
||||
// Added return type optional undefined because passing undefined from test cases.
|
||||
export function getQuotedCqlIdentifier(identifier: string | undefined): string | undefined {
|
||||
let result = identifier;
|
||||
if (!identifier) {
|
||||
return result;
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
import * as Constants from "../Common/Constants";
|
||||
import { userContext } from "../UserContext";
|
||||
|
||||
export const isCapabilityEnabled = (capabilityName: string): boolean =>
|
||||
userContext.databaseAccount?.properties?.capabilities?.some((capability) => capability.name === capabilityName);
|
||||
export const isCapabilityEnabled = (capabilityName: string): boolean => {
|
||||
const { databaseAccount } = userContext;
|
||||
if (databaseAccount && databaseAccount.properties && databaseAccount.properties.capabilities) {
|
||||
return databaseAccount.properties.capabilities.some((capability) => capability.name === capabilityName);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
export const isServerlessAccount = (): boolean => isCapabilityEnabled(Constants.CapabilityNames.EnableServerless);
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
"noUnusedParameters": true
|
||||
},
|
||||
"files": [
|
||||
"./src/Explorer/Notebook/SchemaAnalyzer/SchemaAnalyzerSplashScreen.tsx",
|
||||
"./src/Explorer/Panes/PanelContainerComponent.tsx",
|
||||
"./src/hooks/useSidePanel.ts",
|
||||
"./src/AuthType.ts",
|
||||
"./src/Bindings/ReactBindingHandler.ts",
|
||||
"./src/Common/ArrayHashMap.ts",
|
||||
|
@ -68,12 +65,16 @@
|
|||
"./src/Explorer/Notebook/SchemaAnalyzer/SchemaAnalyzerUtils.ts",
|
||||
"./src/Explorer/OpenFullScreen.test.tsx",
|
||||
"./src/Explorer/OpenFullScreen.tsx",
|
||||
"./src/Explorer/Panes/PanelContainerComponent.test.tsx",
|
||||
"./src/Explorer/Panes/PanelContainerComponent.tsx",
|
||||
"./src/Explorer/Panes/PanelFooterComponent.tsx",
|
||||
"./src/Explorer/Panes/PanelInfoErrorComponent.tsx",
|
||||
"./src/Explorer/Panes/PanelLoadingScreen.tsx",
|
||||
"./src/Explorer/Panes/PanelStyles.ts",
|
||||
"./src/Explorer/Panes/Tables/Validators/EntityPropertyNameValidator.ts",
|
||||
"./src/Explorer/Panes/Tables/Validators/EntityPropertyValidationCommon.ts",
|
||||
"./src/Explorer/Tables/Constants.ts",
|
||||
"./src/Explorer/Tables/CqlUtilities.test.ts",
|
||||
"./src/Explorer/Tables/CqlUtilities.ts",
|
||||
"./src/Explorer/Tables/DataTable/CacheBase.ts",
|
||||
"./src/Explorer/Tables/Entities.ts",
|
||||
|
@ -96,7 +97,9 @@
|
|||
"./src/Shared/Constants.ts",
|
||||
"./src/Shared/DefaultExperienceUtility.ts",
|
||||
"./src/Shared/ExplorerSettings.ts",
|
||||
"./src/Shared/LocalStorageUtility.ts",
|
||||
"./src/Shared/PriceEstimateCalculator.ts",
|
||||
"./src/Shared/SessionStorageUtility.ts",
|
||||
"./src/Shared/StorageUtility.test.ts",
|
||||
"./src/Shared/StorageUtility.ts",
|
||||
"./src/Shared/StringUtility.test.ts",
|
||||
|
@ -108,6 +111,8 @@
|
|||
"./src/Utils/Base64Utils.test.ts",
|
||||
"./src/Utils/Base64Utils.ts",
|
||||
"./src/Utils/BlobUtils.ts",
|
||||
"./src/Utils/CapabilityUtils.ts",
|
||||
"./src/Utils/CloudUtils.ts",
|
||||
"./src/Utils/GitHubUtils.test.ts",
|
||||
"./src/Utils/GitHubUtils.ts",
|
||||
"./src/Utils/MessageValidation.test.ts",
|
||||
|
@ -155,4 +160,4 @@
|
|||
"src/Terminal/**/*",
|
||||
"src/Utils/arm/**/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue