From c5cf5b62fe7f5caeca6a3dd81bddc971b7ace9f6 Mon Sep 17 00:00:00 2001 From: Lexus Drumgold Date: Wed, 3 Aug 2022 20:21:35 -0400 Subject: [PATCH] refactor(types): loosen `Intersection` definition Signed-off-by: Lexus Drumgold --- src/types/intersection.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/types/intersection.ts b/src/types/intersection.ts index 7f722cfd..06d25706 100644 --- a/src/types/intersection.ts +++ b/src/types/intersection.ts @@ -3,19 +3,14 @@ * @module tutils/types/Intersection */ -import type ObjectPlain from './object-plain' - /** - * Combine two types. + * Combines `T1` and `T2`. * - * @see https://typescriptlang.org/docs/handbook/unions-and-intersections.html#intersection-types + * @see https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes-func.html#intersections * - * @template T1 - Object type 1 - * @template T2 - Object type 2 + * @template T1 - Base type(s) + * @template T2 - Type(s) to combine with `T1` */ -type Intersection< - T1 extends ObjectPlain = ObjectPlain, - T2 extends ObjectPlain = ObjectPlain -> = T1 & T2 +type Intersection = T1 & T2 export { type Intersection as default }