mirror of https://github.com/msgbyte/tailchat
feat: add parseModuleDeclaration
parent
0b5ecf9777
commit
384f7000fb
@ -0,0 +1,4 @@
|
||||
declare module '@capital/foo' {
|
||||
export const a: any;
|
||||
export const b: any;
|
||||
}
|
@ -1,11 +1,20 @@
|
||||
import { parseFile } from '../src/tsgenerator';
|
||||
import { parseExports, parseModuleDeclaration } from '../src/tsgenerator';
|
||||
import path from 'path';
|
||||
|
||||
const { exportModules } = parseFile(
|
||||
const { exportModules } = parseExports(
|
||||
path.resolve(__dirname, './demo/index.ts'),
|
||||
{
|
||||
paths: { '@/*': ['./*'] },
|
||||
}
|
||||
);
|
||||
|
||||
console.log(exportModules);
|
||||
console.log('exportModules', exportModules);
|
||||
|
||||
const { modules } = parseModuleDeclaration(
|
||||
path.resolve(__dirname, './index.d.ts'),
|
||||
{
|
||||
paths: { '@/*': ['./*'] },
|
||||
}
|
||||
);
|
||||
|
||||
console.log('modules', modules);
|
||||
|
Loading…
Reference in New Issue