mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 01:25:37 -05:00
Add more folders to strict compile (#8954)
* add more folders to strictire compile, add more strict compile options * update ci * remove unnecessary assertion
This commit is contained in:
@@ -16,11 +16,16 @@ import { ConnectionProviderProperties } from 'sql/platform/capabilities/common/c
|
||||
// Test stubs for commonly used objects
|
||||
|
||||
export class TestConnectionManagementService implements IConnectionManagementService {
|
||||
disconnect(connection: IConnectionProfile): Promise<void>;
|
||||
disconnect(ownerUri: string): Promise<void>;
|
||||
disconnect(ownerUri: any) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
_serviceBrand: undefined;
|
||||
onAddConnectionProfile = undefined;
|
||||
onDeleteConnectionProfile = undefined;
|
||||
onConnectionChanged = undefined;
|
||||
onLanguageFlavorChanged = undefined;
|
||||
onAddConnectionProfile = undefined!;
|
||||
onDeleteConnectionProfile = undefined!;
|
||||
onConnectionChanged = undefined!;
|
||||
onLanguageFlavorChanged = undefined!;
|
||||
|
||||
public get onConnect(): Event<any> {
|
||||
return Event.None;
|
||||
@@ -43,15 +48,15 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
}
|
||||
|
||||
showConnectionDialog(params?: INewConnectionParams, options?: IConnectionCompletionOptions, model?: IConnectionProfile, connectionResult?: IConnectionResult): Promise<void> {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
showCreateServerGroupDialog(): Promise<void> {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
showEditServerGroupDialog(group: ConnectionProfileGroup): Promise<void> {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
onConnectionComplete(handle: number, connectionInfoSummary: azdata.ConnectionInfoSummary): void {
|
||||
@@ -67,7 +72,7 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
}
|
||||
|
||||
getCurrentConnectionSummary(): azdata.ConnectionSummary {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
getConnectionGroups(providers?: string[]): ConnectionProfileGroup[] {
|
||||
@@ -79,7 +84,7 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
}
|
||||
|
||||
saveProfileGroup(profile: IConnectionProfileGroup): Promise<string> {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
getRecentConnections(providers?: string[]): ConnectionProfile[] {
|
||||
@@ -123,15 +128,15 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
}
|
||||
|
||||
getConnectionUri(connectionProfile: ConnectionProfile): string {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
getFormattedUri(uri: string, connectionProfile: ConnectionProfile): string {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
getConnectionUriFromId(connectionId: string): string {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
isConnected(fileUri: string, connectionProfile?: ConnectionProfile): boolean {
|
||||
@@ -151,12 +156,12 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
}
|
||||
|
||||
findExistingConnection(connection: IConnectionProfile, purpose?: 'dashboard' | 'insights' | 'connection'): ConnectionProfile {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
connect(connection: IConnectionProfile, uri: string, options?: IConnectionCompletionOptions, callbacks?: IConnectionCallbacks): Promise<IConnectionResult> {
|
||||
return new Promise<IConnectionResult>((resolve, reject) => {
|
||||
resolve({ connected: true, errorMessage: undefined, errorCode: undefined, callStack: undefined });
|
||||
resolve({ connected: true, errorMessage: undefined!, errorCode: undefined!, callStack: undefined! });
|
||||
});
|
||||
}
|
||||
|
||||
@@ -168,20 +173,12 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
return new Promise<boolean>(() => true);
|
||||
}
|
||||
|
||||
disconnect(connection: IConnectionProfile);
|
||||
disconnect(uri: string);
|
||||
disconnect(input: any): Promise<boolean> {
|
||||
return new Promise<boolean>((resolve, reject) => {
|
||||
resolve(true);
|
||||
});
|
||||
}
|
||||
|
||||
getConnectionProfile(fileUri: string): IConnectionProfile {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
getConnectionInfo(fileUri: string): ConnectionManagementInfo {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
addSavedPassword(connectionProfile: IConnectionProfile): Promise<IConnectionProfile> {
|
||||
@@ -189,15 +186,15 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
}
|
||||
|
||||
public listDatabases(connectionUri: string): Thenable<azdata.ListDatabasesResult> {
|
||||
return Promise.resolve(undefined);
|
||||
return Promise.resolve(undefined!);
|
||||
}
|
||||
|
||||
cancelConnection(connection: IConnectionProfile): Thenable<boolean> {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
cancelEditorConnection(owner: IConnectableInput): Thenable<boolean> {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
showDashboard(connection: ConnectionProfile): Promise<boolean> {
|
||||
@@ -220,7 +217,7 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
}
|
||||
|
||||
getProviderIdFromUri(ownerUri: string): string {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
hasRegisteredServers(): boolean {
|
||||
@@ -228,7 +225,7 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
}
|
||||
|
||||
getCapabilities(providerName: string): azdata.DataProtocolServerCapabilities {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
canChangeConnectionConfig(profile: ConnectionProfile, newGroupID: string): boolean {
|
||||
@@ -243,55 +240,55 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
}
|
||||
|
||||
connectIfNotConnected(connection: IConnectionProfile, purpose?: 'dashboard' | 'insights' | 'connection', saveConnection: boolean = false): Promise<string> {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
rebuildIntelliSenseCache(uri: string): Thenable<void> {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
getTabColorForUri(uri: string): string {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
removeConnectionProfileCredentials(profile: IConnectionProfile): IConnectionProfile {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
getActiveConnectionCredentials(profileId: string): { [name: string]: string } {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
getServerInfo(profileId: string): azdata.ServerInfo {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
getConnectionString(connectionId: string): Thenable<string> {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
buildConnectionInfo(connectionString: string, provider?: string): Thenable<azdata.ConnectionInfo> {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
providerRegistered(providerId: string): boolean {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
getConnectionProfileById(profileId: string): IConnectionProfile {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
getProviderProperties(providerName: string): ConnectionProviderProperties {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
getConnectionIconId(connectionId: string): string {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
getDefaultProviderId(): string {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
|
||||
getConnections(activeConnectionsOnly?: boolean): ConnectionProfile[] {
|
||||
@@ -299,6 +296,6 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
}
|
||||
|
||||
getConnection(uri: string): ConnectionProfile {
|
||||
return undefined;
|
||||
return undefined!;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user