mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-19 06:21:56 +08:00
Style: code style
This commit is contained in:
parent
c298eae5bb
commit
e463b878b4
@ -1,6 +1,6 @@
|
||||
import { IsEqual } from 'type-fest'
|
||||
|
||||
import Infer from '@lib/type'
|
||||
import { Infer } from '@lib/type'
|
||||
|
||||
import en_US from './en_US'
|
||||
import zh_CN from './zh_CN'
|
||||
|
@ -1,5 +1,7 @@
|
||||
type InferRecursion<K extends string, T> = T extends object ? { [P in keyof T]: P extends string ? InferRecursion<`${K}.${P}`, T[P]> : K }[keyof T] : K
|
||||
type InferRecursion<T, K extends string> =
|
||||
T extends object
|
||||
? { [P in keyof T]: P extends string ? InferRecursion<T[P], `${K}.${P}`> : K }[keyof T]
|
||||
: K
|
||||
|
||||
type Infer<T> = Extract<{ [K in keyof T]: K extends string ? InferRecursion<K, T[K]> : unknown }[keyof T], string>
|
||||
|
||||
export default Infer
|
||||
export type Infer<T> =
|
||||
Extract<{ [K in keyof T]: K extends string ? InferRecursion<T[K], K> : unknown }[keyof T], string>
|
||||
|
@ -17,7 +17,7 @@ import { isClashX, jsBridge } from '@lib/jsBridge'
|
||||
import { Snapshot } from '@lib/request'
|
||||
import * as API from '@lib/request'
|
||||
import { StreamReader } from '@lib/streamer'
|
||||
import Infer from '@lib/type'
|
||||
import { Infer } from '@lib/type'
|
||||
import * as Models from '@models'
|
||||
import { Log } from '@models/Log'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user