mirror of
https://github.com/Microsoft/vscode
synced 2024-10-12 22:37:41 +00:00
functional: not
This commit is contained in:
parent
74c66852b1
commit
3634d3d197
11
src/vs/base/common/functional.ts
Normal file
11
src/vs/base/common/functional.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
export function not<A>(fn: (a: A) => boolean): (a: A) => boolean;
|
||||
export function not(fn: Function): Function {
|
||||
return (...args) => !fn(...args);
|
||||
}
|
Loading…
Reference in a new issue