diff --git a/packages/types/src/utils.ts b/packages/types/src/utils.ts index f4a925f3b..26c2e6d45 100644 --- a/packages/types/src/utils.ts +++ b/packages/types/src/utils.ts @@ -1,13 +1,21 @@ import { NpmInfo } from './npm'; +import { JSExpression, JSFunction } from './value-type'; -export type UtilsMap = Array< -| { - name: string; - type: 'npm'; - content: NpmInfo; - } -| { - name: string; - type: ''; - } ->; +export type UtilItem = + | { + name: string; + type: 'npm'; + content: NpmInfo; + } + | { + name: string; + type: 'tnpm'; + content: NpmInfo; + } + | { + name: string; + type: 'function'; + content: JSFunction | JSExpression; + }; + +export type UtilsMap = UtilItem[];