uts.d.ts 1.7 KB

123456789101112131415161718192021222324252627
  1. /// <reference types="node" />
  2. /// <reference types="node" />
  3. import * as UTSCompiler from '@dcloudio/uni-uts-v1';
  4. import { type EasycomMatcher } from './easycom';
  5. /**
  6. * 解析 app 平台的 uts 插件,任意平台(android|ios)存在即可
  7. * @param id
  8. * @param importer
  9. * @returns
  10. */
  11. export declare function resolveUTSAppModule(id: string, importer: string, includeUTSSDK?: boolean): string | undefined;
  12. export declare function resolveUTSModule(id: string, importer: string, includeUTSSDK?: boolean): string | undefined;
  13. export declare function resolveUTSCompiler(): typeof UTSCompiler;
  14. export declare function isUTSComponent(name: string): boolean;
  15. export declare function parseUTSComponent(name: string, type: 'kotlin' | 'swift'): {
  16. className: string;
  17. namespace: string;
  18. source: string;
  19. } | undefined;
  20. export declare function initUTSComponents(inputDir: string, platform: UniApp.PLATFORM): EasycomMatcher[];
  21. export declare function parseKotlinPackageWithPluginId(id: string, is_uni_modules: boolean): string;
  22. export declare function parseSwiftPackageWithPluginId(id: string, is_uni_modules: boolean): string;
  23. export type UTSTargetLanguage = typeof process.env.UNI_UTS_TARGET_LANGUAGE;
  24. export declare const parseUniExtApiNamespacesOnce: (platform: typeof process.env.UNI_UTS_PLATFORM, language: UTSTargetLanguage) => Record<string, [string, string]>;
  25. export declare const parseUniExtApiNamespacesJsOnce: (platform: typeof process.env.UNI_UTS_PLATFORM, language: UTSTargetLanguage) => Record<string, [string, string]>;
  26. export declare function matchUTSComponent(tag: string): boolean;
  27. export declare function genUTSClassName(fileName: string, prefix?: string): string;