From 3634d3d197adbf2947e891d7016be32e3e3186e1 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 15 Sep 2016 17:29:48 +0200 Subject: [PATCH] functional: not --- src/vs/base/common/functional.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/vs/base/common/functional.ts diff --git a/src/vs/base/common/functional.ts b/src/vs/base/common/functional.ts new file mode 100644 index 00000000000..5be547ec594 --- /dev/null +++ b/src/vs/base/common/functional.ts @@ -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(fn: (a: A) => boolean): (a: A) => boolean; +export function not(fn: Function): Function { + return (...args) => !fn(...args); +} \ No newline at end of file -- GitLab