版博士V2.0程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

29 lines
699 B

  1. import { Plugin } from 'vite';
  2. type Include = 'all' | (keyof typeof console)[];
  3. /**
  4. * transform code
  5. * @param code the code of source
  6. * @param include scope to be removed
  7. * @returns the code of transformed
  8. */
  9. declare function transform(code: string, include: Include): string;
  10. interface Options {
  11. /**
  12. * @default ["log", "warn", "error"]
  13. */
  14. include: Include;
  15. /**
  16. * @default true
  17. */
  18. ignoreNodeModules: boolean;
  19. /**
  20. * @default undefined
  21. */
  22. normalize: (path: string) => boolean;
  23. }
  24. declare function export_default(options?: Partial<Options>): Plugin;
  25. export { export_default as default, transform as gogocodeRemovelog };