mirror of
https://gitee.com/newgateway/vtj.git
synced 2026-05-11 15:38:35 +08:00
12 lines
318 B
TypeScript
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)}
|
|
}`;
|
|
});
|
|
}
|