@eclipse-glsp/protocol
Advanced tools
Comparing version 2.2.0-next.329 to 2.2.0-next.330
@@ -128,2 +128,8 @@ /******************************************************************************** | ||
}; | ||
/** | ||
* Helper function to create an array of values without any undefined values. | ||
* @param values The values to create the array from. | ||
* @returns The array of values without any undefined values. | ||
*/ | ||
export declare function arrayOf<T>(...values: (T | undefined)[]): T[]; | ||
//# sourceMappingURL=array-util.d.ts.map |
@@ -18,3 +18,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.partition = exports.isArrayMatching = exports.isStringArray = exports.isArrayOfPrimitive = exports.isArrayOfClass = exports.isArrayOfType = exports.distinctAdd = exports.asArray = exports.flatPush = exports.remove = exports.pluck = exports.last = exports.first = void 0; | ||
exports.arrayOf = exports.partition = exports.isArrayMatching = exports.isStringArray = exports.isArrayOfPrimitive = exports.isArrayOfClass = exports.isArrayOfType = exports.distinctAdd = exports.asArray = exports.flatPush = exports.remove = exports.pluck = exports.last = exports.first = void 0; | ||
function first(array, n) { | ||
@@ -167,2 +167,11 @@ if (n) { | ||
exports.partition = partition; | ||
/** | ||
* Helper function to create an array of values without any undefined values. | ||
* @param values The values to create the array from. | ||
* @returns The array of values without any undefined values. | ||
*/ | ||
function arrayOf(...values) { | ||
return values.filter(element => element !== undefined); | ||
} | ||
exports.arrayOf = arrayOf; | ||
//# sourceMappingURL=array-util.js.map |
@@ -57,3 +57,7 @@ /******************************************************************************** | ||
get isDisposed(): boolean; | ||
/** | ||
* Removes all disposables in this collection WITHOUT triggering their disposal behavior. | ||
*/ | ||
clear(): void; | ||
} | ||
//# sourceMappingURL=disposable.d.ts.map |
@@ -65,4 +65,10 @@ "use strict"; | ||
} | ||
/** | ||
* Removes all disposables in this collection WITHOUT triggering their disposal behavior. | ||
*/ | ||
clear() { | ||
this.disposables.length = 0; | ||
} | ||
} | ||
exports.DisposableCollection = DisposableCollection; | ||
//# sourceMappingURL=disposable.js.map |
@@ -64,2 +64,4 @@ /******************************************************************************** | ||
export type SafeFunction<T = any> = (...args: any[]) => T; | ||
export type MaybeFunction<T = any> = T | SafeFunction<T>; | ||
export declare function call<T>(maybeFun: MaybeFunction<T>, ...args: any[]): T; | ||
/** | ||
@@ -66,0 +68,0 @@ * Validates whether the given object has a property of type `string` with the given key. |
@@ -18,3 +18,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.hasArrayProp = exports.hasFunctionProp = exports.hasObjectProp = exports.hasNumberProp = exports.hasBooleanProp = exports.hasStringProp = exports.toTypeGuard = exports.AnyObject = void 0; | ||
exports.hasArrayProp = exports.hasFunctionProp = exports.hasObjectProp = exports.hasNumberProp = exports.hasBooleanProp = exports.hasStringProp = exports.call = exports.toTypeGuard = exports.AnyObject = void 0; | ||
var AnyObject; | ||
@@ -43,2 +43,6 @@ (function (AnyObject) { | ||
exports.toTypeGuard = toTypeGuard; | ||
function call(maybeFun, ...args) { | ||
return typeof maybeFun === 'function' ? maybeFun(...args) : maybeFun; | ||
} | ||
exports.call = call; | ||
/** | ||
@@ -45,0 +49,0 @@ * Validates whether the given object has a property of type `string` with the given key. |
{ | ||
"name": "@eclipse-glsp/protocol", | ||
"version": "2.2.0-next.329+d53e2e2", | ||
"version": "2.2.0-next.330+bf4b88a", | ||
"description": "The protocol definition for client-server communication in GLSP", | ||
@@ -61,3 +61,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "d53e2e2ab356951621fb85eea3d0a32541ff9b23" | ||
"gitHead": "bf4b88a15d066b5c7869870afa43e161dc097007" | ||
} |
@@ -196,1 +196,10 @@ /******************************************************************************** | ||
} | ||
/** | ||
* Helper function to create an array of values without any undefined values. | ||
* @param values The values to create the array from. | ||
* @returns The array of values without any undefined values. | ||
*/ | ||
export function arrayOf<T>(...values: (T | undefined)[]): T[] { | ||
return values.filter(element => element !== undefined) as T[]; | ||
} |
@@ -99,2 +99,9 @@ /******************************************************************************** | ||
} | ||
/** | ||
* Removes all disposables in this collection WITHOUT triggering their disposal behavior. | ||
*/ | ||
clear(): void { | ||
this.disposables.length = 0; | ||
} | ||
} |
@@ -78,2 +78,8 @@ /******************************************************************************** | ||
export type MaybeFunction<T = any> = T | SafeFunction<T>; | ||
export function call<T>(maybeFun: MaybeFunction<T>, ...args: any[]): T { | ||
return typeof maybeFun === 'function' ? (maybeFun as SafeFunction<T>)(...args) : maybeFun; | ||
} | ||
/** | ||
@@ -80,0 +86,0 @@ * Validates whether the given object has a property of type `string` with the given key. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 7 instances in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 7 instances in 1 package
1084718
18883