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.

64 lines
3.8 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/// <reference types="node" />
/// <reference types="node" />
import { type Import, type Unimport } from 'unimport';
import type * as UTSCompiler from '@dcloudio/uni-uts-v1';
import type { EasycomMatcher } from './easycom';
/**
* 解析 app 平台的 uts 插件任意平台android|ios存在即可
* @param id
* @param importer
* @returns
*/
export declare function resolveUTSAppModule(platform: typeof process.env.UNI_UTS_PLATFORM, id: string, importer: string, includeUTSSDK?: boolean): string | undefined;
export declare function resolveUTSModule(id: string, importer: string, includeUTSSDK?: boolean): string | undefined;
export declare function resolveUTSCompiler(throwError?: boolean): typeof UTSCompiler;
export declare function resolveUTSCompilerVersion(): string;
interface UTSComponentMeta {
source: string;
kotlinPackage: string;
swiftModule: string;
kotlinNamespace: string;
swiftNamespace: string;
}
interface UTSCustomElementMeta extends UTSComponentMeta {
exports: [string][];
}
export declare function getUTSCustomElementsExports(): Map<string, UTSCustomElementMeta>;
export declare function clearUTSComponents(): void;
export declare function isUTSComponent(name: string): boolean;
export declare function clearUTSCustomElements(): void;
export declare function getUTSCustomElements(): Map<string, UTSComponentMeta>;
export declare function getUTSPluginCustomElements(): Record<string, Set<string>>;
export declare function isUTSCustomElement(name: string): boolean;
export declare function getUTSCustomElement(name: string): UTSComponentMeta | undefined;
export declare function getUTSComponentAutoImports(language: 'kotlin' | 'swift'): Record<string, [[string]]>;
export declare function getUTSCustomElementAutoImports(language: 'kotlin' | 'swift'): Record<string, [string][]>;
export declare function parseUTSComponent(name: string, type: 'kotlin' | 'swift'): {
className: string;
namespace: string;
source: string;
} | undefined;
export declare function parseUTSCustomElement(name: string, type: 'kotlin' | 'swift'): {
className: string;
namespace: string;
source: string;
} | undefined;
export declare function initUTSComponents(inputDir: string, platform: UniApp.PLATFORM): EasycomMatcher[];
export declare function initUTSCustomElements(inputDir: string, platform: UniApp.PLATFORM): EasycomMatcher[];
export declare function parseCustomElementExports(filePath: string, unimport?: Unimport): Promise<Import[]>;
export declare function parseKotlinPackageWithPluginId(id: string, is_uni_modules: boolean): string;
export declare function parseSwiftPackageWithPluginId(id: string, is_uni_modules: boolean): string;
export declare function parseSwiftModuleWithPluginId(id: string, is_uni_modules: boolean): string;
export type UTSTargetLanguage = typeof process.env.UNI_UTS_TARGET_LANGUAGE;
export declare const parseUniExtApiNamespacesOnce: (platform: typeof process.env.UNI_UTS_PLATFORM, language: UTSTargetLanguage) => Record<string, [string, string]>;
export declare const parseUniExtApiNamespacesJsOnce: (platform: typeof process.env.UNI_UTS_PLATFORM, language: UTSTargetLanguage) => Record<string, [string, string]>;
export declare function resolveUniTypeScript(): any;
export declare function initUTSKotlinAutoImportsOnce(): Promise<Record<string, [string, (string | undefined)?][]>>;
export declare function initUTSSwiftAutoImportsOnce(): Promise<Record<string, [string, (string | undefined)?][]>>;
export declare const genUniExtApiDeclarationFileOnce: (tscInputDir: string) => void;
export declare function uvueOutDir(platform: 'app-android' | 'app-ios' | 'app-harmony'): string;
export declare function tscOutDir(platform: 'app-android' | 'app-ios' | 'app-harmony'): string;
export declare function isUTSProxy(id: string): boolean;
export declare function isUniHelpers(id: string): boolean;
export {};