MCPcopy
hub / github.com/baidu/amis / formatType

Function formatType

packages/amis-formula/scripts/genDoc.ts:33–44  ·  view source on GitHub ↗
(tag: any)

Source from the content-addressed store, hash-verified

31}
32
33function formatType(tag: any): string {
34 // console.log(tag);
35 if (tag.type === 'RestType') {
36 return `...${formatType(tag.expression)}`;
37 } else if (tag.type === 'TypeApplication') {
38 return `Array<${tag.applications
39 .map((item: any) => formatType(item))
40 .join(',')}>`;
41 }
42
43 return tag.name;
44}
45
46async function main(...params: Array<any>) {
47 const contents = fs.readFileSync(jsFile, 'utf8');

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected