@arkts/shared
Version:
ArkTS common utilities package.
59 lines (58 loc) • 2.4 kB
TypeScript
import { LanguageServerLogger, LanguageServerLoggerOptions } from "./lsp-logger-DaBRwMIA.js";
import * as ohos_typescript0 from "ohos-typescript";
//#region src/client-options.d.ts
interface VolarClientOptions {
/** The currently tsdk path. */
tsdk: string;
}
interface OhosClientOptions {
/** The currently ohos sdk path. If not exists the lsp will not work. */
sdkPath: string | undefined;
/** The currently hms sdk path. */
hmsSdkPath: string | undefined;
/** The `ets/component` folder of the SDK. If not exists the lsp will not work. */
etsComponentPath: string | undefined;
/** The `ets/build-tools/ets-loader/tsconfig.json` path. If not exists the lsp will not work. */
etsLoaderConfigPath: string | undefined;
/** The `ets/build-tools/ets-loader` path. If not exists the lsp will not work. */
etsLoaderPath: string | undefined;
/** The libs of the SDK, and typescript compiler options. */
lib: string[];
/** typeRoots for the typescript compiler. */
typeRoots: string[];
/** The base url for the typescript compiler. */
baseUrl: string;
/** The paths for the typescript compiler, will be original pass to typescript. */
paths: ohos_typescript0.MapLike<string[]>;
/** The paths for the typescript compiler, will be converted to relative paths with detected tsconfig file. */
relativeWithConfigFilePaths?: ohos_typescript0.MapLike<string[]>;
}
interface EtsServerClientOptions {
/** Volar client options. */
typescript: VolarClientOptions;
/** ETS server options. */
ohos: OhosClientOptions;
/** Debug mode. */
debug?: boolean;
}
//#endregion
//#region src/ts-plugin-options.d.ts
type GetAPI = (version: 0) => {
configurePlugin: <PluginName extends keyof PluginOptions>(pluginName: PluginName, options: PluginOptions[PluginName]) => void;
};
interface TypescriptLanguageFeatures {
getAPI?: GetAPI;
}
interface ETSPluginOptions {
workspaceFolder: string | undefined;
lspOptions: EtsServerClientOptions;
}
interface PluginOptions {
"ets-typescript-plugin": ETSPluginOptions;
}
//#endregion
//#region src/index.d.ts
declare function typeAssert<T>(_value: unknown): asserts _value is T;
//#endregion
export { ETSPluginOptions, EtsServerClientOptions, LanguageServerLogger, LanguageServerLoggerOptions, OhosClientOptions, PluginOptions, TypescriptLanguageFeatures, VolarClientOptions, typeAssert };
//# sourceMappingURL=index.d.ts.map