File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,15 +9,6 @@ type TrimStart<S extends string> = S extends ` ${infer Rest}` | `\t${infer Rest}
99 ? TrimStart < Rest >
1010 : S ;
1111
12- type __TrimEnd < S extends string > = S extends `${infer Rest } ` | `${infer Rest } \t` | `${infer Rest } \n`
13- ? __TrimEnd < Rest >
14- : S ;
15-
16- type __Trim < S extends string > = TrimStart < __TrimEnd < S > > ;
17-
18- /** 字符串是否以某前缀开头 */
19- type _StartsWith < S extends string , Prefix extends string > = S extends `${Prefix } ${string } ` ? true : false ;
20-
2112/** 是否是字母或下划线 */
2213type IsIdentifierStart < C extends string > = C extends
2314 | "a"
@@ -88,25 +79,6 @@ type IsIdentifierChar<C extends string> =
8879/** 是否是数字 */
8980type IsDigit < C extends string > = C extends "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ? true : false ;
9081
91- /** 是否是运算符字符 */
92- type _IsOperatorChar < C extends string > = C extends
93- | "+"
94- | "-"
95- | "*"
96- | "/"
97- | "%"
98- | "="
99- | "!"
100- | "<"
101- | ">"
102- | "&"
103- | "|"
104- | "^"
105- | "~"
106- | "?"
107- ? true
108- : false ;
109-
11082/** JS保留字和全局对象 */
11183type ReservedWords =
11284 | "true"
@@ -238,9 +210,6 @@ export type ContextTypeMap<TContext> = {
238210 [ K in keyof TContext ] : ExtractType < TContext [ K ] > ;
239211} ;
240212
241- /** 检查所有标识符是否都在上下文中定义 */
242- type _ValidateIdentifiers < Ids extends string , ContextKeys extends string > = Ids extends ContextKeys ? true : false ;
243-
244213/** 找出未定义的标识符 */
245214type FindUndefinedIdentifiers < Ids extends string , ContextKeys extends string > = Ids extends ContextKeys ? never : Ids ;
246215
You can’t perform that action at this time.
0 commit comments