functional: not

This commit is contained in:
Joao Moreno 2016-09-15 17:29:48 +02:00
parent 74c66852b1
commit 3634d3d197

View 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);
}