mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-08 01:28:26 -05:00
connection contribution point (#880)
* init * finished compile erros * fixed all merge conflicts * fix dialog problems * formatting * fix opening dialog on first open * fix various problems with connectiondialog * formatting * fix tests * added connection contrib * formatting * formatting and adding capabilities to shutdown * fix connection buffering * formatting * fix tests
This commit is contained in:
@@ -111,3 +111,14 @@ export class TrieMap<E> {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
export function toObject<V>(map: Map<string, V>): { [key: string]: V } {
|
||||
if (map) {
|
||||
let rt: { [key: string]: V } = Object.create(null);
|
||||
map.forEach((v, k) => {
|
||||
rt[k] = v;
|
||||
});
|
||||
return rt;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ export function mixin(destination: any, source: any, overwrite: boolean = true,
|
||||
if (overwrite) {
|
||||
if (Types.isObject(destination[key]) && Types.isObject(source[key])) {
|
||||
mixin(destination[key], source[key], overwrite, fn);
|
||||
} else if(fn) {
|
||||
} else if (fn) {
|
||||
destination[key] = fn(destination[key], source[key], overwrite);
|
||||
} else {
|
||||
destination[key] = source[key];
|
||||
@@ -50,4 +50,12 @@ export function mixin(destination: any, source: any, overwrite: boolean = true,
|
||||
});
|
||||
}
|
||||
return destination;
|
||||
}
|
||||
}
|
||||
|
||||
export function entries<T>(o: { [key: string]: T }): [string, T][] {
|
||||
return Object.entries(o);
|
||||
}
|
||||
|
||||
export function values<T>(o: { [key: string]: T }): T[] {
|
||||
return Object.values(o);
|
||||
}
|
||||
|
||||
@@ -17,4 +17,10 @@ export class Deferred<T> {
|
||||
this.reject = reject;
|
||||
});
|
||||
}
|
||||
|
||||
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>;
|
||||
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => void): Thenable<TResult>;
|
||||
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult> | void): Thenable<TResult> {
|
||||
return this.promise.then(onfulfilled, onrejected);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user