From 9dc231dae7c74835a06f791e49a9f10fb8616b44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E6=9E=AB?= <7971419+crazyair@users.noreply.github.com> Date: Tue, 13 Aug 2024 22:39:45 +0800 Subject: [PATCH] feat: length = 3 (#1170) Co-authored-by: afc163 --- src/namePathType.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/namePathType.ts b/src/namePathType.ts index 2f221d65d..0ed5b4bb2 100644 --- a/src/namePathType.ts +++ b/src/namePathType.ts @@ -8,7 +8,7 @@ type BaseNamePath = string | number | boolean | (string | number | boolean)[]; export type DeepNamePath< Store = any, ParentNamePath extends any[] = [], -> = ParentNamePath['length'] extends 5 +> = ParentNamePath['length'] extends 3 ? never : // Follow code is batch check if `Store` is base type true extends (Store extends BaseNamePath ? true : false)