Files
vtj/packages/coder/src/parser/inject.ts
陈华春 1a34acc9b1 coder
2024-01-11 21:15:51 +08:00

12 lines
318 B
TypeScript

import { type BlockInject } from '@vtj/core';
import { parseValue } from '../utils';
export function parseInject(inject: BlockInject[] = []) {
return inject.map((n) => {
return `${n.name}: {
from: '${n.from || n.name}',
default: ${parseValue(n.default, true, false)}
}`;
});
}