From 79b80371d94e258c2cc1eeee41625ccc212369f6 Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Wed, 7 Feb 2018 12:22:49 +0000 Subject: removed types from options.ts to remove ts-node ambiguity --- src/matcher/options.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/matcher/options.ts b/src/matcher/options.ts index 1ffa24e..b356c7b 100644 --- a/src/matcher/options.ts +++ b/src/matcher/options.ts @@ -1,9 +1,6 @@ import { default as types } from './types'; -type matchType - = (boolean | ((T) => boolean)); - -export function match(template: Object, value?: Object): matchType { +export function match(template: Object, value?: Object) { if (value === undefined) { return match.bind(null, template); } @@ -16,7 +13,7 @@ export function match(template: Object, value?: Object): matchType { return true; } -export function exact(template: Object, value?: Object): matchType { +export function exact(template: Object, value?: Object) { if (value === undefined) { return exact.bind(null, template); } @@ -28,7 +25,7 @@ export function exact(template: Object, value?: Object): matchType { && k2.every((x) => k1.indexOf(x) < 0); } -export function optional(template: Function, value?: any): matchType { +export function optional(template: Function, value?: any) { if (value === undefined) { return optional.bind(null, template); } @@ -37,7 +34,7 @@ export function optional(template: Function, value?: any): matchType { || template(value); } -export function alternative(templates: any[], value?: any): matchType { +export function alternative(templates: any[], value?: any) { if (value === undefined) { return alternative.bind(null, templates); } @@ -58,8 +55,7 @@ export function alternative(templates: any[], value?: any): matchType { } } -export function array(template: Object, values?: Array): -matchType> { +export function array(template: Object, values?: Array) { if (values === undefined) { return array.bind(null, template); } -- cgit v1.2.1