mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-10-07 14:13:45 +00:00
调整publicSDK打包kit输出,修改kit文件名称
Signed-off-by: wangcaoyu <wangcaoyu@huawei.com>
This commit is contained in:
parent
cfc04bff5a
commit
b1f707438d
@ -13,12 +13,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import type ability from '../@ohos.ability.ability';
|
||||
import ability from '../@ohos.ability.ability';
|
||||
import { ErrorCode } from '../@ohos.ability.errorCode';
|
||||
import featureAbility from '../@ohos.ability.featureAbility';
|
||||
import particleAbility from '../@ohos.ability.particleAbility';
|
||||
import abilityAccessCtrl, {
|
||||
type Context, type PermissionRequestResult, Permissions
|
||||
Context, PermissionRequestResult, Permissions
|
||||
} from '../@ohos.abilityAccessCtrl';
|
||||
import Ability from '../@ohos.app.ability.Ability';
|
||||
import AbilityConstant from '../@ohos.app.ability.AbilityConstant';
|
||||
@ -34,8 +34,8 @@ import autoFillManager from '../@ohos.app.ability.autoFillManager';
|
||||
import autoStartupManager from '../@ohos.app.ability.autoStartupManager';
|
||||
import ChildProcess from '../@ohos.app.ability.ChildProcess';
|
||||
import childProcessManager from '../@ohos.app.ability.childProcessManager';
|
||||
import type common from '../@ohos.app.ability.common';
|
||||
import { type Configuration } from '../@ohos.app.ability.Configuration';
|
||||
import common from '../@ohos.app.ability.common';
|
||||
import { Configuration } from '../@ohos.app.ability.Configuration';
|
||||
import ConfigurationConstant from '../@ohos.app.ability.ConfigurationConstant';
|
||||
import contextConstant from '../@ohos.app.ability.contextConstant';
|
||||
import dataUriUtils from '../@ohos.app.ability.dataUriUtils';
|
||||
@ -55,14 +55,14 @@ import ServiceExtensionAbility from '../@ohos.app.ability.ServiceExtensionAbilit
|
||||
import ShareExtensionAbility from '../@ohos.app.ability.ShareExtensionAbility';
|
||||
import StartOptions from '../@ohos.app.ability.StartOptions';
|
||||
import UIAbility, {
|
||||
type Callee, type CalleeCallback, type Caller, type OnReleaseCallback, type OnRemoteStateChangeCallback
|
||||
Callee, CalleeCallback, Caller, OnReleaseCallback, OnRemoteStateChangeCallback
|
||||
} from '../@ohos.app.ability.UIAbility';
|
||||
import UIExtensionAbility from '../@ohos.app.ability.UIExtensionAbility';
|
||||
import UIExtensionContentSession from '../@ohos.app.ability.UIExtensionContentSession';
|
||||
import UserAuthExtensionAbility from '../@ohos.app.ability.UserAuthExtensionAbility';
|
||||
import Want from '../@ohos.app.ability.Want';
|
||||
import wantConstant from '../@ohos.app.ability.wantConstant';
|
||||
import wantAgent, { type WantAgent } from '../@ohos.app.ability.wantAgent';
|
||||
import wantAgent, { WantAgent } from '../@ohos.app.ability.wantAgent';
|
||||
import businessAbilityRouter from '../@ohos.app.businessAbilityRouter';
|
||||
import uriPermissionManager from '../@ohos.application.uriPermissionManager';
|
||||
import appControl from '../@ohos.bundle.appControl';
|
||||
@ -73,7 +73,7 @@ import bundle from '../@ohos.bundle';
|
||||
import defaultAppManager from '../@ohos.bundle.defaultAppManager';
|
||||
import distributedBundleManager from '../@ohos.bundle.distributedBundleManager';
|
||||
import freeInstall from '../@ohos.bundle.freeInstall';
|
||||
import innerBundleManager, { type BundleStatusCallback } from '../@ohos.bundle.innerBundleManager';
|
||||
import innerBundleManager, { BundleStatusCallback } from '../@ohos.bundle.innerBundleManager';
|
||||
import installer from '../@ohos.bundle.installer';
|
||||
import launcherBundleManager from '../@ohos.bundle.launcherBundleManager';
|
||||
import overlay from '../@ohos.bundle.overlay';
|
||||
@ -81,20 +81,20 @@ import continuationManager from '../@ohos.continuation.continuationManager';
|
||||
import distributedBundle from '../@ohos.distributedBundle';
|
||||
import distributedMissionManager from '../@ohos.distributedMissionManager';
|
||||
import Package, {
|
||||
type CheckPackageHasInstalledOptions, type CheckPackageHasInstalledResponse
|
||||
CheckPackageHasInstalledOptions, CheckPackageHasInstalledResponse
|
||||
} from '../@system.package';
|
||||
|
||||
export {
|
||||
Ability, AbilityConstant, AbilityLifecycleCallback, AbilityStage, ActionExtensionAbility,
|
||||
ApplicationStateChangeCallback, AutoFillExtensionAbility, type BundleStatusCallback, type Callee,
|
||||
type CalleeCallback, type Caller, type CheckPackageHasInstalledOptions, type CheckPackageHasInstalledResponse,
|
||||
ChildProcess, type Configuration, ConfigurationConstant, type Context, EnvironmentCallback, ErrorCode,
|
||||
ApplicationStateChangeCallback, AutoFillExtensionAbility, BundleStatusCallback, Callee,
|
||||
CalleeCallback, Caller, CheckPackageHasInstalledOptions, CheckPackageHasInstalledResponse,
|
||||
ChildProcess, Configuration, ConfigurationConstant, Context, EnvironmentCallback, ErrorCode,
|
||||
ExtensionAbility, InsightIntentContext, InsightIntentExecutor, MediaControlExtensionAbility,
|
||||
type OnReleaseCallback, type OnRemoteStateChangeCallback, Package, type PermissionRequestResult, Permissions,
|
||||
OnReleaseCallback, OnRemoteStateChangeCallback, Package, PermissionRequestResult, Permissions,
|
||||
ServiceExtensionAbility, ShareExtensionAbility, StartOptions, UIAbility, UIExtensionAbility,
|
||||
UIExtensionContentSession, UserAuthExtensionAbility, Want, type WantAgent, type ability, abilityAccessCtrl,
|
||||
UIExtensionContentSession, UserAuthExtensionAbility, Want, WantAgent, ability, abilityAccessCtrl,
|
||||
abilityManager, appControl, appManager, appRecovery, autoFillManager, autoStartupManager, bundle, bundleManager,
|
||||
bundleMonitor, bundleResourceManager, businessAbilityRouter, childProcessManager, type common, contextConstant,
|
||||
bundleMonitor, bundleResourceManager, businessAbilityRouter, childProcessManager, common, contextConstant,
|
||||
continuationManager, dataUriUtils, defaultAppManager, dialogRequest, dialogSession, distributedBundle,
|
||||
distributedBundleManager, distributedMissionManager, errorManager, featureAbility, freeInstall,
|
||||
innerBundleManager, insightIntent, insightIntentDriver, installer, launcherBundleManager, missionManager,
|
@ -18,12 +18,12 @@ import accessibility from '../@ohos.accessibility';
|
||||
import { GesturePath } from '../@ohos.accessibility.GesturePath';
|
||||
import { GesturePoint } from '../@ohos.accessibility.GesturePoint';
|
||||
import AccessibilityExtensionAbility, {
|
||||
type AccessibilityElement, type AccessibilityExtensionContext, type ElementAttributeKeys,
|
||||
type ElementAttributeValues, type FocusDirection, type FocusType, type Rect, type WindowType
|
||||
AccessibilityElement, AccessibilityExtensionContext, ElementAttributeKeys,
|
||||
ElementAttributeValues, FocusDirection, FocusType, Rect, WindowType
|
||||
} from '../@ohos.application.AccessibilityExtensionAbility';
|
||||
|
||||
export {
|
||||
type AccessibilityElement, AccessibilityExtensionAbility, type AccessibilityExtensionContext,
|
||||
type ElementAttributeKeys, type ElementAttributeValues, type FocusDirection, type FocusType, GesturePath,
|
||||
GesturePoint, type Rect, type WindowType, accessibility, config
|
||||
AccessibilityElement, AccessibilityExtensionAbility, AccessibilityExtensionContext,
|
||||
ElementAttributeKeys, ElementAttributeValues, FocusDirection, FocusType, GesturePath,
|
||||
GesturePoint, Rect, WindowType, accessibility, config
|
||||
};
|
@ -14,9 +14,9 @@
|
||||
*/
|
||||
|
||||
import { AdComponent } from '../@ohos.advertising.AdComponent';
|
||||
import AdsServiceExtensionAbility, { type RespCallback } from '../@ohos.advertising.AdsServiceExtensionAbility';
|
||||
import AdsServiceExtensionAbility, { RespCallback } from '../@ohos.advertising.AdsServiceExtensionAbility';
|
||||
import { AutoAdComponent } from '../@ohos.advertising.AutoAdComponent';
|
||||
import advertising from '../@ohos.advertising';
|
||||
import identifier from '../@ohos.identifier.oaid';
|
||||
|
||||
export { AdComponent, AdsServiceExtensionAbility, AutoAdComponent, type RespCallback, advertising, identifier };
|
||||
export { AdComponent, AdsServiceExtensionAbility, AutoAdComponent, RespCallback, advertising, identifier };
|
@ -19,8 +19,7 @@ import commonType from '../@ohos.data.commonType';
|
||||
import dataAbility from '../@ohos.data.dataAbility';
|
||||
import dataShare from '../@ohos.data.dataShare';
|
||||
import dataSharePredicates from '../@ohos.data.dataSharePredicates';
|
||||
import type DataShareResultSet from '../@ohos.data.DataShareResultSet';
|
||||
import { DataType } from '../@ohos.data.DataShareResultSet';
|
||||
import DataShareResultSet, { DataType } from '../@ohos.data.DataShareResultSet';
|
||||
import distributedData from '../@ohos.data.distributedData';
|
||||
import distributedDataObject from '../@ohos.data.distributedDataObject';
|
||||
import distributedKVStore from '../@ohos.data.distributedKVStore';
|
||||
@ -30,14 +29,14 @@ import relationalStore from '../@ohos.data.relationalStore';
|
||||
import storage from '../@ohos.data.storage';
|
||||
import unifiedDataChannel from '../@ohos.data.unifiedDataChannel';
|
||||
import uniformTypeDescriptor from '../@ohos.data.uniformTypeDescriptor';
|
||||
import { type ValueType, type ValuesBucket } from '../@ohos.data.ValuesBucket';
|
||||
import { ValueType, ValuesBucket } from '../@ohos.data.ValuesBucket';
|
||||
import Storage, {
|
||||
type ClearStorageOptions, type DeleteStorageOptions, type GetStorageOptions, type SetStorageOptions
|
||||
ClearStorageOptions, DeleteStorageOptions, GetStorageOptions, SetStorageOptions
|
||||
} from '../@system.storage';
|
||||
|
||||
export {
|
||||
type ClearStorageOptions, DataShareExtensionAbility, type DataShareResultSet, DataType, type DeleteStorageOptions,
|
||||
type GetStorageOptions, type SetStorageOptions, Storage, type ValueType, type ValuesBucket, cloudData, commonType,
|
||||
ClearStorageOptions, DataShareExtensionAbility, DataShareResultSet, DataType, DeleteStorageOptions,
|
||||
GetStorageOptions, SetStorageOptions, Storage, ValueType, ValuesBucket, cloudData, commonType,
|
||||
dataAbility, dataShare, dataSharePredicates, distributedData, distributedDataObject, distributedKVStore,
|
||||
preferences, rdb, relationalStore, storage, unifiedDataChannel, uniformTypeDescriptor
|
||||
};
|
14
api/kits/ArkTS.d.ts → api/kits/@kit.ArkTS.d.ts
vendored
14
api/kits/ArkTS.d.ts → api/kits/@kit.ArkTS.d.ts
vendored
@ -35,16 +35,16 @@ import TreeMap from '../@ohos.util.TreeMap';
|
||||
import TreeSet from '../@ohos.util.TreeSet';
|
||||
import Vector from '../@ohos.util.Vector';
|
||||
import worker, {
|
||||
type DedicatedWorkerGlobalScope, type ErrorEvent, type Event, type EventListener, type EventTarget,
|
||||
type MessageEvent, type MessageEvents, type PostMessageOptions, type ThreadWorkerGlobalScope,
|
||||
type WorkerEventListener, type WorkerEventTarget, type WorkerOptions
|
||||
DedicatedWorkerGlobalScope, ErrorEvent, Event, EventListener, EventTarget,
|
||||
MessageEvent, MessageEvents, PostMessageOptions, ThreadWorkerGlobalScope,
|
||||
WorkerEventListener, WorkerEventTarget, WorkerOptions
|
||||
} from '../@ohos.worker';
|
||||
import xml from '../@ohos.xml';
|
||||
|
||||
export {
|
||||
ArrayList, convertxml, type DedicatedWorkerGlobalScope, Deque, type ErrorEvent, type Event, type EventListener,
|
||||
type EventTarget, HashMap, HashSet, LightWeightMap, LightWeightSet, LinkedList, List, type MessageEvent,
|
||||
type MessageEvents, PlainArray, type PostMessageOptions, Queue, Stack, type ThreadWorkerGlobalScope, TreeMap,
|
||||
TreeSet, Vector, type WorkerEventListener, type WorkerEventTarget, type WorkerOptions, buffer, process, taskpool,
|
||||
ArrayList, convertxml, DedicatedWorkerGlobalScope, Deque, ErrorEvent, Event, EventListener,
|
||||
EventTarget, HashMap, HashSet, LightWeightMap, LightWeightSet, LinkedList, List, MessageEvent,
|
||||
MessageEvents, PlainArray, PostMessageOptions, Queue, Stack, ThreadWorkerGlobalScope, TreeMap,
|
||||
TreeSet, Vector, WorkerEventListener, WorkerEventTarget, WorkerOptions, buffer, process, taskpool,
|
||||
uri, url, util, worker, xml
|
||||
};
|
44
api/kits/ArkUI.d.ts → api/kits/@kit.ArkUI.d.ts
vendored
44
api/kits/ArkUI.d.ts → api/kits/@kit.ArkUI.d.ts
vendored
@ -14,8 +14,8 @@
|
||||
*/
|
||||
|
||||
import windowAnimationManager from '../@ohos.animation.windowAnimationManager';
|
||||
import Animator, { type AnimatorOptions, AnimatorResult } from '../@ohos.animator';
|
||||
import WindowExtensionAbility, { type WindowExtensionContext } from '../@ohos.application.WindowExtensionAbility';
|
||||
import Animator, { AnimatorOptions, AnimatorResult } from '../@ohos.animator';
|
||||
import WindowExtensionAbility, { WindowExtensionContext } from '../@ohos.application.WindowExtensionAbility';
|
||||
import { Breadcrumb, LabelInfo } from '../@ohos.arkui.advanced.Breadcrumb';
|
||||
import {
|
||||
Chip, ChipOptions, ChipSize, IconCommonOptions, LabelMarginOptions, LabelOptions, PrefixIconOptions,
|
||||
@ -61,7 +61,7 @@ import inspector from '../@ohos.arkui.inspector';
|
||||
import uiObserver from '../@ohos.arkui.observer';
|
||||
import performanceMonitor from '../@ohos.arkui.performanceMonitor';
|
||||
import {
|
||||
type AtomicServiceBar, ComponentUtils, DragController, Font, KeyboardAvoidMode, MediaQuery, PromptAction, Router,
|
||||
AtomicServiceBar, ComponentUtils, DragController, Font, KeyboardAvoidMode, MediaQuery, PromptAction, Router,
|
||||
UIContext, UIInspector, UIObserver
|
||||
} from '../@ohos.arkui.UIContext';
|
||||
import curves from '../@ohos.curves';
|
||||
@ -69,7 +69,7 @@ import dragInteraction from '../@ohos.deviceStatus.dragInteraction';
|
||||
import display from '../@ohos.display';
|
||||
import font from '../@ohos.font';
|
||||
import matrix4 from '../@ohos.matrix4';
|
||||
import MeasureText, { type MeasureOptions } from '../@ohos.measure';
|
||||
import MeasureText, { MeasureOptions } from '../@ohos.measure';
|
||||
import mediaquery from '../@ohos.mediaquery';
|
||||
import PiPWindow from '../@ohos.PiPWindow';
|
||||
import pluginComponentManager from '../@ohos.pluginComponent';
|
||||
@ -80,39 +80,39 @@ import screen from '../@ohos.screen';
|
||||
import screenshot from '../@ohos.screenshot';
|
||||
import uiAppearance from '../@ohos.uiAppearance';
|
||||
import window from '../@ohos.window';
|
||||
import App, { type AppResponse, type RequestFullWindowOptions, type ScreenOnVisibleOptions } from '../@system.app';
|
||||
import Configuration, { type LocaleResponse } from '../@system.configuration';
|
||||
import SystemMediaQuery, { type MediaQueryEvent, type MediaQueryList } from '../@system.mediaquery';
|
||||
import App, { AppResponse, RequestFullWindowOptions, ScreenOnVisibleOptions } from '../@system.app';
|
||||
import Configuration, { LocaleResponse } from '../@system.configuration';
|
||||
import SystemMediaQuery, { MediaQueryEvent, MediaQueryList } from '../@system.mediaquery';
|
||||
import Prompt, {
|
||||
type Button, type ShowActionMenuOptions, type ShowDialogOptions, type ShowDialogSuccessResponse,
|
||||
type ShowToastOptions
|
||||
Button, ShowActionMenuOptions, ShowDialogOptions, ShowDialogSuccessResponse,
|
||||
ShowToastOptions
|
||||
} from '../@system.prompt';
|
||||
import SystemRouter, {
|
||||
type BackRouterOptions, type DisableAlertBeforeBackPageOptions, type EnableAlertBeforeBackPageOptions,
|
||||
type RouterOptions, type RouterState
|
||||
BackRouterOptions, DisableAlertBeforeBackPageOptions, EnableAlertBeforeBackPageOptions,
|
||||
RouterOptions, RouterState
|
||||
} from '../@system.router';
|
||||
|
||||
export {
|
||||
AlertDialog, Animator, type AnimatorOptions, AnimatorResult, App, type AppResponse, type AtomicServiceBar,
|
||||
type BackRouterOptions, Breadcrumb, type Button, ButtonOptions, CallbackParam,
|
||||
AlertDialog, Animator, AnimatorOptions, AnimatorResult, App, AppResponse, AtomicServiceBar,
|
||||
BackRouterOptions, Breadcrumb, Button, ButtonOptions, CallbackParam,
|
||||
CapsuleSegmentButtonConstructionOptions, CapsuleSegmentButtonOptions, Chip, ChipOptions, ChipSize, ComponentUtils,
|
||||
ComposeListItem, ComposeTitleBar, ComposeTitleBarMenuItem, Configuration, ConfirmDialog, ContentItem,
|
||||
CounterComponent, CounterOptions, CounterType, DateData, type DisableAlertBeforeBackPageOptions, DragController,
|
||||
CounterComponent, CounterOptions, CounterType, DateData, DisableAlertBeforeBackPageOptions, DragController,
|
||||
DrawableDescriptor, EditableLeftIconType, EditableTitleBar, EditableTitleBarMenuItem, EditorEventInfo,
|
||||
EditorMenuOptions, type EnableAlertBeforeBackPageOptions, ExpandedMenuOptions, Filter, FilterParams, FilterResult,
|
||||
EditorMenuOptions, EnableAlertBeforeBackPageOptions, ExpandedMenuOptions, Filter, FilterParams, FilterResult,
|
||||
FilterType, Font, IconCommonOptions, IconType, ItemState, KeyboardAvoidMode, LabelInfo, LabelMarginOptions,
|
||||
LabelOptions, LayeredDrawableDescriptor, LoadingDialog, type LocaleResponse, type MeasureOptions, MeasureText,
|
||||
MediaQuery, type MediaQueryEvent, type MediaQueryList, NodeParam, OperateButton, OperateCheck, OperateIcon,
|
||||
LabelOptions, LayeredDrawableDescriptor, LoadingDialog, LocaleResponse, MeasureOptions, MeasureText,
|
||||
MediaQuery, MediaQueryEvent, MediaQueryList, NodeParam, OperateButton, OperateCheck, OperateIcon,
|
||||
OperateItem, OperationOption, OperationType, PiPWindow, Popup, PopupButtonOptions, PopupIconOptions, PopupOptions,
|
||||
PopupTextOptions, PrefixIconOptions, ProgressButton, Prompt, PromptAction, type RequestFullWindowOptions, Router,
|
||||
type RouterOptions, type RouterState, type ScreenOnVisibleOptions, SegmentButton, SegmentButtonItemOptionsArray,
|
||||
PopupTextOptions, PrefixIconOptions, ProgressButton, Prompt, PromptAction, RequestFullWindowOptions, Router,
|
||||
RouterOptions, RouterState, ScreenOnVisibleOptions, SegmentButton, SegmentButtonItemOptionsArray,
|
||||
SegmentButtonOptions, SelectDialog, SelectOptions, SelectTitleBar, SelectTitleBarMenuItem, SelectionMenu,
|
||||
SelectionMenuOptions, type ShowActionMenuOptions, type ShowDialogOptions, type ShowDialogSuccessResponse,
|
||||
type ShowToastOptions, SplitLayout, SubHeader, SuffixIconOptions, SwipeRefresher, SystemMediaQuery, SystemRouter,
|
||||
SelectionMenuOptions, ShowActionMenuOptions, ShowDialogOptions, ShowDialogSuccessResponse,
|
||||
ShowToastOptions, SplitLayout, SubHeader, SuffixIconOptions, SwipeRefresher, SystemMediaQuery, SystemRouter,
|
||||
TabSegmentButtonConstructionOptions, TabSegmentButtonOptions, TabTitleBar, TabTitleBarMenuItem, TabTitleBarTabItem,
|
||||
TipsDialog, ToolBar, ToolBarOption, ToolBarOptions, TreeController, TreeListenType, TreeListener,
|
||||
TreeListenerManager, TreeView, UIContext, UIInspector, UIObserver, WindowExtensionAbility,
|
||||
type WindowExtensionContext, componentSnapshot, componentUtils, curves, display, dragController, dragInteraction,
|
||||
WindowExtensionContext, componentSnapshot, componentUtils, curves, display, dragController, dragInteraction,
|
||||
font, inspector, matrix4, mediaquery, performanceMonitor, pluginComponentManager, prompt, promptAction, router,
|
||||
screen, screenshot, uiAppearance, uiObserver, window, windowAnimationManager
|
||||
};
|
@ -21,10 +21,10 @@ import deviceStandby from '../@ohos.resourceschedule.deviceStandby';
|
||||
import usageStatistics from '../@ohos.resourceschedule.usageStatistics';
|
||||
import workScheduler from '../@ohos.resourceschedule.workScheduler';
|
||||
import WorkSchedulerExtensionAbility, {
|
||||
type WorkSchedulerExtensionContext
|
||||
WorkSchedulerExtensionContext
|
||||
} from '../@ohos.WorkSchedulerExtensionAbility';
|
||||
|
||||
export {
|
||||
WorkSchedulerExtensionAbility, type WorkSchedulerExtensionContext, backgroundTaskManager, bundleState,
|
||||
WorkSchedulerExtensionAbility, WorkSchedulerExtensionContext, backgroundTaskManager, bundleState,
|
||||
deviceStandby, reminderAgent, reminderAgentManager, usageStatistics, workScheduler
|
||||
};
|
@ -17,7 +17,7 @@ import appAccount from '../@ohos.account.appAccount';
|
||||
import distributedAccount from '../@ohos.account.distributedAccount';
|
||||
import osAccount from '../@ohos.account.osAccount';
|
||||
import PrintExtensionAbility from '../@ohos.app.ability.PrintExtensionAbility';
|
||||
import { type AsyncCallback, type BusinessError, type Callback, type ErrorCallback } from '../@ohos.base';
|
||||
import { AsyncCallback, BusinessError, Callback, ErrorCallback } from '../@ohos.base';
|
||||
import batteryInfo from '../@ohos.batteryInfo';
|
||||
import batteryStats from '../@ohos.batteryStatistics';
|
||||
import brightness from '../@ohos.brightness';
|
||||
@ -44,25 +44,25 @@ import usbManager from '../@ohos.usbManager';
|
||||
import wallpaper from '../@ohos.wallpaper';
|
||||
import WallpaperExtensionAbility from '../@ohos.WallpaperExtensionAbility';
|
||||
import zlib from '../@ohos.zlib';
|
||||
import Battery, { type BatteryResponse, type GetStatusOptions } from '../@system.battery';
|
||||
import Battery, { BatteryResponse, GetStatusOptions } from '../@system.battery';
|
||||
import Brightness, {
|
||||
type BrightnessModeResponse, type BrightnessResponse, type GetBrightnessModeOptions, type GetBrightnessOptions,
|
||||
type SetBrightnessModeOptions, type SetBrightnessOptions, type SetKeepScreenOnOptions
|
||||
BrightnessModeResponse, BrightnessResponse, GetBrightnessModeOptions, GetBrightnessOptions,
|
||||
SetBrightnessModeOptions, SetBrightnessOptions, SetKeepScreenOnOptions
|
||||
} from '../@system.brightness';
|
||||
import Device, { type DeviceResponse, type GetDeviceOptions } from '../@system.device';
|
||||
import Device, { DeviceResponse, GetDeviceOptions } from '../@system.device';
|
||||
import Request, {
|
||||
type DownloadRequestOptions, type DownloadResponse, type OnDownloadCompleteOptions,
|
||||
type OnDownloadCompleteResponse, type RequestData, type RequestFile, type UploadRequestOptions, type UploadResponse
|
||||
DownloadRequestOptions, DownloadResponse, OnDownloadCompleteOptions,
|
||||
OnDownloadCompleteResponse, RequestData, RequestFile, UploadRequestOptions, UploadResponse
|
||||
} from '../@system.request';
|
||||
|
||||
export {
|
||||
type AsyncCallback, Battery, type BatteryResponse, Brightness, type BrightnessModeResponse,
|
||||
type BrightnessResponse, type BusinessError, type Callback, Device, type DeviceResponse,
|
||||
type DownloadRequestOptions, type DownloadResponse, type ErrorCallback, type GetBrightnessModeOptions,
|
||||
type GetBrightnessOptions, type GetDeviceOptions, type GetStatusOptions, type OnDownloadCompleteOptions,
|
||||
type OnDownloadCompleteResponse, PrintExtensionAbility, Request, type RequestData, type RequestFile,
|
||||
type SetBrightnessModeOptions, type SetBrightnessOptions, type SetKeepScreenOnOptions, type UploadRequestOptions,
|
||||
type UploadResponse, WallpaperExtensionAbility, appAccount, batteryInfo, batteryStats, brightness, charger,
|
||||
AsyncCallback, Battery, BatteryResponse, Brightness, BrightnessModeResponse,
|
||||
BrightnessResponse, BusinessError, Callback, Device, DeviceResponse,
|
||||
DownloadRequestOptions, DownloadResponse, ErrorCallback, GetBrightnessModeOptions,
|
||||
GetBrightnessOptions, GetDeviceOptions, GetStatusOptions, OnDownloadCompleteOptions,
|
||||
OnDownloadCompleteResponse, PrintExtensionAbility, Request, RequestData, RequestFile,
|
||||
SetBrightnessModeOptions, SetBrightnessOptions, SetKeepScreenOnOptions, UploadRequestOptions,
|
||||
UploadResponse, WallpaperExtensionAbility, appAccount, batteryInfo, batteryStats, brightness, charger,
|
||||
deviceAttest, deviceInfo, distributedAccount, osAccount, pasteboard, power, print, request, runningLock,
|
||||
screenLock, settings, systemCapability, systemDateTime, systemParameter, systemParameterEnhance, systemTime,
|
||||
systemTimer, thermal, update, usb, usbManager, wallpaper, zlib
|
@ -37,13 +37,13 @@ import wifiext from '../@ohos.wifiext';
|
||||
import wifiManager from '../@ohos.wifiManager';
|
||||
import wifiManagerExt from '../@ohos.wifiManagerExt';
|
||||
import Bluetooth, {
|
||||
type BLEFoundResponse, type BluetoothDevice, type StartBLEScanOptions, type StopBLEScanOptions,
|
||||
type SubscribeBLEFoundOptions
|
||||
BLEFoundResponse, BluetoothDevice, StartBLEScanOptions, StopBLEScanOptions,
|
||||
SubscribeBLEFoundOptions
|
||||
} from '../@system.bluetooth';
|
||||
|
||||
export {
|
||||
type BLEFoundResponse, Bluetooth, type BluetoothDevice, type StartBLEScanOptions, type StopBLEScanOptions,
|
||||
type SubscribeBLEFoundOptions, a2dp, access, baseProfile, ble, bluetooth, bluetoothManager, cardEmulation,
|
||||
BLEFoundResponse, Bluetooth, BluetoothDevice, StartBLEScanOptions, StopBLEScanOptions,
|
||||
SubscribeBLEFoundOptions, a2dp, access, baseProfile, ble, bluetooth, bluetoothManager, cardEmulation,
|
||||
connectedTag, connection, constant, hfp, hid, nfcController, omapi, pan, pbap, socket, tag, wearDetection, wifi,
|
||||
wifiManager, wifiManagerExt, wifiext
|
||||
};
|
@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import BackupExtensionAbility, { type BundleVersion } from '../@ohos.application.BackupExtensionAbility';
|
||||
import BackupExtensionAbility, { BundleVersion } from '../@ohos.application.BackupExtensionAbility';
|
||||
import document from '../@ohos.document';
|
||||
import backup from '../@ohos.file.backup';
|
||||
import cloudSync from '../@ohos.file.cloudSync';
|
||||
@ -23,8 +23,8 @@ import fileAccess from '../@ohos.file.fileAccess';
|
||||
import fileExtensionInfo from '../@ohos.file.fileExtensionInfo';
|
||||
import fileUri from '../@ohos.file.fileuri';
|
||||
import fileIo, {
|
||||
type ConflictFiles, type Filter, type Options, type ReaderIteratorResult, type WatchEvent, type WatchEventListener,
|
||||
type Watcher
|
||||
ConflictFiles, Filter, Options, ReaderIteratorResult, WatchEvent, WatchEventListener,
|
||||
Watcher
|
||||
} from '../@ohos.file.fs';
|
||||
import hash from '../@ohos.file.hash';
|
||||
import picker from '../@ohos.file.picker';
|
||||
@ -39,19 +39,19 @@ import userFileManager from '../@ohos.filemanagement.userFileManager';
|
||||
import fileShare from '../@ohos.fileshare';
|
||||
import Statfs from '../@ohos.statfs';
|
||||
import File, {
|
||||
type FileAccessOption, type FileCopyOption, type FileDeleteOption, type FileGetOption, type FileListOption,
|
||||
type FileListResponse, type FileMkdirOption, type FileMoveOption, type FileReadArrayBufferOption,
|
||||
type FileReadArrayBufferResponse, type FileReadTextOption, type FileReadTextResponse, type FileResponse,
|
||||
type FileRmdirOption, type FileWriteArrayBufferOption, type FileWriteTextOption
|
||||
FileAccessOption, FileCopyOption, FileDeleteOption, FileGetOption, FileListOption,
|
||||
FileListResponse, FileMkdirOption, FileMoveOption, FileReadArrayBufferOption,
|
||||
FileReadArrayBufferResponse, FileReadTextOption, FileReadTextResponse, FileResponse,
|
||||
FileRmdirOption, FileWriteArrayBufferOption, FileWriteTextOption
|
||||
} from '../@system.file';
|
||||
|
||||
export {
|
||||
BackupExtensionAbility, type BundleVersion, type ConflictFiles, Environment, File, type FileAccessOption,
|
||||
type FileCopyOption, type FileDeleteOption, type FileGetOption, type FileListOption, type FileListResponse,
|
||||
type FileMkdirOption, type FileMoveOption, type FileReadArrayBufferOption, type FileReadArrayBufferResponse,
|
||||
type FileReadTextOption, type FileReadTextResponse, type FileResponse, type FileRmdirOption,
|
||||
type FileWriteArrayBufferOption, type FileWriteTextOption, type Filter, type Options, type ReaderIteratorResult,
|
||||
Statfs, type WatchEvent, type WatchEventListener, type Watcher, backup, cloudSync, cloudSyncManager, document,
|
||||
BackupExtensionAbility, BundleVersion, ConflictFiles, Environment, File, FileAccessOption,
|
||||
FileCopyOption, FileDeleteOption, FileGetOption, FileListOption, FileListResponse,
|
||||
FileMkdirOption, FileMoveOption, FileReadArrayBufferOption, FileReadArrayBufferResponse,
|
||||
FileReadTextOption, FileReadTextResponse, FileResponse, FileRmdirOption,
|
||||
FileWriteArrayBufferOption, FileWriteTextOption, Filter, Options, ReaderIteratorResult,
|
||||
Statfs, WatchEvent, WatchEventListener, Watcher, backup, cloudSync, cloudSyncManager, document,
|
||||
fileAccess, fileExtensionInfo, fileIO, fileIo, fileShare, fileUri, hash, picker, recent, securityLabel, statfs,
|
||||
storageStatistics, trash, userFileManager, volumeManager
|
||||
};
|
@ -14,6 +14,6 @@
|
||||
*/
|
||||
|
||||
import cryptoFramework from '../@ohos.security.cryptoFramework';
|
||||
import Cipher, { type CipherAesOptions, type CipherResponse, type CipherRsaOptions } from '../@system.cipher';
|
||||
import Cipher, { CipherAesOptions, CipherResponse, CipherRsaOptions } from '../@system.cipher';
|
||||
|
||||
export { Cipher, type CipherAesOptions, type CipherResponse, type CipherRsaOptions, cryptoFramework };
|
||||
export { Cipher, CipherAesOptions, CipherResponse, CipherRsaOptions, cryptoFramework };
|
@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import DriverExtensionAbility, { type DriverExtensionContext } from '../@ohos.app.ability.DriverExtensionAbility';
|
||||
import DriverExtensionAbility, { DriverExtensionContext } from '../@ohos.app.ability.DriverExtensionAbility';
|
||||
import deviceManager from '../@ohos.driver.deviceManager';
|
||||
|
||||
export { DriverExtensionAbility, type DriverExtensionContext, deviceManager };
|
||||
export { DriverExtensionAbility, DriverExtensionContext, deviceManager };
|
@ -17,8 +17,8 @@ import inputMethod from '../@ohos.inputMethod';
|
||||
import inputMethodEngine from '../@ohos.inputMethodEngine';
|
||||
import InputMethodExtensionAbility from '../@ohos.InputMethodExtensionAbility';
|
||||
import InputMethodExtensionContext from '../@ohos.InputMethodExtensionContext';
|
||||
import type InputMethodSubtype from '../@ohos.InputMethodSubtype';
|
||||
import InputMethodSubtype from '../@ohos.InputMethodSubtype';
|
||||
|
||||
export {
|
||||
InputMethodExtensionAbility, InputMethodExtensionContext, type InputMethodSubtype, inputMethod, inputMethodEngine
|
||||
InputMethodExtensionAbility, InputMethodExtensionContext, InputMethodSubtype, inputMethod, inputMethodEngine
|
||||
};
|
@ -13,33 +13,33 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { PanelFlag, type PanelInfo, PanelType } from '../@ohos.inputMethod.Panel';
|
||||
import { PanelFlag, PanelInfo, PanelType } from '../@ohos.inputMethod.Panel';
|
||||
import { InputMethodListDialog, Pattern, PatternOptions } from '../@ohos.inputMethodList';
|
||||
import {
|
||||
ActionType, type FourFingersSwipe, type Pinch, type Rotate, type ThreeFingersSwipe, type ThreeFingersTap
|
||||
ActionType, FourFingersSwipe, Pinch, Rotate, ThreeFingersSwipe, ThreeFingersTap
|
||||
} from '../@ohos.multimodalInput.gestureEvent';
|
||||
import inputConsumer from '../@ohos.multimodalInput.inputConsumer';
|
||||
import inputDevice from '../@ohos.multimodalInput.inputDevice';
|
||||
import inputDeviceCooperate from '../@ohos.multimodalInput.inputDeviceCooperate';
|
||||
import { type InputEvent } from '../@ohos.multimodalInput.inputEvent';
|
||||
import { InputEvent } from '../@ohos.multimodalInput.inputEvent';
|
||||
import inputEventClient from '../@ohos.multimodalInput.inputEventClient';
|
||||
import inputMonitor from '../@ohos.multimodalInput.inputMonitor';
|
||||
import { IntentionCode } from '../@ohos.multimodalInput.intentionCode';
|
||||
import { KeyCode } from '../@ohos.multimodalInput.keyCode';
|
||||
import { Action, type Key, type KeyEvent } from '../@ohos.multimodalInput.keyEvent';
|
||||
import { Action, Key, KeyEvent } from '../@ohos.multimodalInput.keyEvent';
|
||||
import {
|
||||
Action as MouseAction, Axis, type AxisValue, Button, type MouseEvent, ToolType as MouseToolType
|
||||
Action as MouseAction, Axis, AxisValue, Button, MouseEvent, ToolType as MouseToolType
|
||||
} from '../@ohos.multimodalInput.mouseEvent';
|
||||
import pointer from '../@ohos.multimodalInput.pointer';
|
||||
import shortKey from '../@ohos.multimodalInput.shortKey';
|
||||
import {
|
||||
Action as KeyAction, SourceType, ToolType, type Touch, type TouchEvent
|
||||
Action as KeyAction, SourceType, ToolType, Touch, TouchEvent
|
||||
} from '../@ohos.multimodalInput.touchEvent';
|
||||
|
||||
export {
|
||||
Action, ActionType, Axis, type AxisValue, Button, type FourFingersSwipe, type InputEvent, InputMethodListDialog,
|
||||
IntentionCode, type Key, KeyAction, KeyCode, type KeyEvent, MouseAction, type MouseEvent, MouseToolType, PanelFlag,
|
||||
type PanelInfo, PanelType, Pattern, PatternOptions, type Pinch, type Rotate, SourceType, type ThreeFingersSwipe,
|
||||
type ThreeFingersTap, ToolType, type Touch, type TouchEvent, inputConsumer, inputDevice, inputDeviceCooperate,
|
||||
Action, ActionType, Axis, AxisValue, Button, FourFingersSwipe, InputEvent, InputMethodListDialog,
|
||||
IntentionCode, Key, KeyAction, KeyCode, KeyEvent, MouseAction, MouseEvent, MouseToolType, PanelFlag,
|
||||
PanelInfo, PanelType, Pattern, PatternOptions, Pinch, Rotate, SourceType, ThreeFingersSwipe,
|
||||
ThreeFingersTap, ToolType, Touch, TouchEvent, inputConsumer, inputDevice, inputDeviceCooperate,
|
||||
inputEventClient, inputMonitor, pointer, shortKey
|
||||
};
|
@ -16,11 +16,11 @@
|
||||
import geolocation from '../@ohos.geolocation';
|
||||
import geoLocationManager from '../@ohos.geoLocationManager';
|
||||
import Geolocation, {
|
||||
type GeolocationResponse, type GetLocationOption, type GetLocationTypeOption, type GetLocationTypeResponse,
|
||||
type SubscribeLocationOption
|
||||
GeolocationResponse, GetLocationOption, GetLocationTypeOption, GetLocationTypeResponse,
|
||||
SubscribeLocationOption
|
||||
} from '../@system.geolocation';
|
||||
|
||||
export {
|
||||
Geolocation, type GeolocationResponse, type GetLocationOption, type GetLocationTypeOption,
|
||||
type GetLocationTypeResponse, type SubscribeLocationOption, geoLocationManager, geolocation
|
||||
Geolocation, GeolocationResponse, GetLocationOption, GetLocationTypeOption,
|
||||
GetLocationTypeResponse, SubscribeLocationOption, geoLocationManager, geolocation
|
||||
};
|
@ -23,10 +23,10 @@ import socket from '../@ohos.net.socket';
|
||||
import statistics from '../@ohos.net.statistics';
|
||||
import vpn from '../@ohos.net.vpn';
|
||||
import webSocket from '../@ohos.net.webSocket';
|
||||
import Fetch, { type FetchResponse } from '../@system.fetch';
|
||||
import Network, { type NetworkResponse } from '../@system.network';
|
||||
import Fetch, { FetchResponse } from '../@system.fetch';
|
||||
import Network, { NetworkResponse } from '../@system.network';
|
||||
|
||||
export {
|
||||
Fetch, type FetchResponse, Network, type NetworkResponse, connection, ethernet, http, mdns, policy, sharing,
|
||||
Fetch, FetchResponse, Network, NetworkResponse, connection, ethernet, http, mdns, policy, sharing,
|
||||
socket, statistics, vpn, webSocket
|
||||
};
|
@ -21,10 +21,10 @@ import emitter from '../@ohos.events.emitter';
|
||||
import notification from '../@ohos.notification';
|
||||
import notificationManager from '../@ohos.notificationManager';
|
||||
import notificationSubscribe from '../@ohos.notificationSubscribe';
|
||||
import Notification, { type ActionResult, type ShowNotificationOptions } from '../@system.notification';
|
||||
import Notification, { ActionResult, ShowNotificationOptions } from '../@system.notification';
|
||||
|
||||
export {
|
||||
type ActionResult, Notification, type ShowNotificationOptions, StaticSubscriberExtensionAbility,
|
||||
ActionResult, Notification, ShowNotificationOptions, StaticSubscriberExtensionAbility,
|
||||
StaticSubscriberExtensionContext, commonEvent, commonEventManager, emitter, notification, notificationManager,
|
||||
notificationSubscribe
|
||||
};
|
36
api/kits/@kit.SensorServiceKit.d.ts
vendored
Normal file
36
api/kits/@kit.SensorServiceKit.d.ts
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import sensor from '../@ohos.sensor';
|
||||
import vibrator from '../@ohos.vibrator';
|
||||
import Sensor, {
|
||||
AccelerometerResponse, BarometerResponse, CompassResponse, DeviceOrientationResponse,
|
||||
GetOnBodyStateOptions, GyroscopeResponse, HeartRateResponse, LightResponse,
|
||||
OnBodyStateResponse, ProximityResponse, StepCounterResponse, SubscribeBarometerOptions,
|
||||
SubscribeCompassOptions, SubscribeDeviceOrientationOptions, SubscribeGyroscopeOptions,
|
||||
SubscribeHeartRateOptions, SubscribeLightOptions, SubscribeOnBodyStateOptions,
|
||||
SubscribeProximityOptions, SubscribeStepCounterOptions, subscribeAccelerometerOptions
|
||||
} from '../@system.sensor';
|
||||
import Vibrator, { VibrateOptions } from '../@system.vibrator';
|
||||
|
||||
export {
|
||||
AccelerometerResponse, BarometerResponse, CompassResponse, DeviceOrientationResponse,
|
||||
GetOnBodyStateOptions, GyroscopeResponse, HeartRateResponse, LightResponse,
|
||||
OnBodyStateResponse, ProximityResponse, Sensor, StepCounterResponse, SubscribeBarometerOptions,
|
||||
SubscribeCompassOptions, SubscribeDeviceOrientationOptions, SubscribeGyroscopeOptions,
|
||||
SubscribeHeartRateOptions, SubscribeLightOptions, SubscribeOnBodyStateOptions,
|
||||
SubscribeProximityOptions, SubscribeStepCounterOptions, VibrateOptions, Vibrator, sensor,
|
||||
subscribeAccelerometerOptions, vibrator
|
||||
};
|
@ -14,14 +14,14 @@
|
||||
*/
|
||||
|
||||
import abilityDelegatorRegistry from '../@ohos.app.ability.abilityDelegatorRegistry';
|
||||
import type TestRunner from '../@ohos.application.testRunner';
|
||||
import TestRunner from '../@ohos.application.testRunner';
|
||||
import {
|
||||
BY, By, Component, DisplayRotation, Driver, MatchPattern, MouseButton, ON, On, PointerMatrix, ResizeDirection,
|
||||
type UIElementInfo, type UIEventObserver, UiComponent, UiDirection, UiDriver, UiWindow, WindowMode
|
||||
UIElementInfo, UIEventObserver, UiComponent, UiDirection, UiDriver, UiWindow, WindowMode
|
||||
} from '../@ohos.UiTest';
|
||||
|
||||
export {
|
||||
BY, By, Component, DisplayRotation, Driver, MatchPattern, MouseButton, ON, On, PointerMatrix, ResizeDirection,
|
||||
type TestRunner, type UIElementInfo, type UIEventObserver, UiComponent, UiDirection, UiDriver, UiWindow,
|
||||
TestRunner, UIElementInfo, UIEventObserver, UiComponent, UiDirection, UiDriver, UiWindow,
|
||||
WindowMode, abilityDelegatorRegistry
|
||||
};
|
36
api/kits/SensorServiceKit.d.ts
vendored
36
api/kits/SensorServiceKit.d.ts
vendored
@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import sensor from '../@ohos.sensor';
|
||||
import vibrator from '../@ohos.vibrator';
|
||||
import Sensor, {
|
||||
type AccelerometerResponse, type BarometerResponse, type CompassResponse, type DeviceOrientationResponse,
|
||||
type GetOnBodyStateOptions, type GyroscopeResponse, type HeartRateResponse, type LightResponse,
|
||||
type OnBodyStateResponse, type ProximityResponse, type StepCounterResponse, type SubscribeBarometerOptions,
|
||||
type SubscribeCompassOptions, type SubscribeDeviceOrientationOptions, type SubscribeGyroscopeOptions,
|
||||
type SubscribeHeartRateOptions, type SubscribeLightOptions, type SubscribeOnBodyStateOptions,
|
||||
type SubscribeProximityOptions, type SubscribeStepCounterOptions, type subscribeAccelerometerOptions
|
||||
} from '../@system.sensor';
|
||||
import Vibrator, { VibrateOptions } from '../@system.vibrator';
|
||||
|
||||
export {
|
||||
type AccelerometerResponse, type BarometerResponse, type CompassResponse, type DeviceOrientationResponse,
|
||||
type GetOnBodyStateOptions, type GyroscopeResponse, type HeartRateResponse, type LightResponse,
|
||||
type OnBodyStateResponse, type ProximityResponse, Sensor, type StepCounterResponse, type SubscribeBarometerOptions,
|
||||
type SubscribeCompassOptions, type SubscribeDeviceOrientationOptions, type SubscribeGyroscopeOptions,
|
||||
type SubscribeHeartRateOptions, type SubscribeLightOptions, type SubscribeOnBodyStateOptions,
|
||||
type SubscribeProximityOptions, type SubscribeStepCounterOptions, VibrateOptions, Vibrator, sensor,
|
||||
type subscribeAccelerometerOptions, vibrator
|
||||
};
|
@ -59,7 +59,7 @@ function tsTransformKitFile(url) {
|
||||
if (kitFileNeedDeleteMap.length === 0) {
|
||||
return;
|
||||
}
|
||||
const kitPath = path.resolve(url, './kit');
|
||||
const kitPath = path.resolve(url, './kits');
|
||||
const kitFiles = [];
|
||||
readFile(kitPath, kitFiles); // 读取文件
|
||||
kitFiles.forEach((kitFile) => {
|
||||
@ -70,16 +70,19 @@ function tsTransformKitFile(url) {
|
||||
const content = fs.readFileSync(kitFile, 'utf-8');
|
||||
const fileName = processFileName(kitFile);
|
||||
let sourceFile = ts.createSourceFile(fileName, content, ts.ScriptTarget.ES2017, true);
|
||||
sourceFile = getKitNewSourceFile(sourceFile, kitName);
|
||||
const sourceInfo = getKitNewSourceFile(sourceFile, kitName);
|
||||
const printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed });
|
||||
let result = printer.printNode(ts.EmitHint.Unspecified, sourceFile, sourceFile);
|
||||
let result = printer.printNode(ts.EmitHint.Unspecified, sourceInfo.sourceFile, sourceFile);
|
||||
if (sourceInfo.copyrightMessage !== '') {
|
||||
result = sourceInfo.copyrightMessage + result;
|
||||
}
|
||||
writeFile(kitFile, result);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理kit中需要删除的节点,在其他文件被systemapi修饰的api
|
||||
* @param { ts.sourceFile } sourceFile
|
||||
* @param { ts.SourceFile } sourceFile
|
||||
* @param { string } kitName
|
||||
* @returns 删除完的节点,全部删除为空字符串
|
||||
*/
|
||||
@ -87,13 +90,16 @@ function getKitNewSourceFile(sourceFile, kitName) {
|
||||
const newStatements = [];
|
||||
const needDeleteExportName = new Set();
|
||||
const needDeleteMap = kitFileNeedDeleteMap.get(kitName);
|
||||
let copyrightMessage = '';
|
||||
// 初始化ts工厂
|
||||
const factory = ts.factory;
|
||||
sourceFile.statements.forEach((statement) => {
|
||||
sourceFile.statements.forEach((statement, index) => {
|
||||
if (ts.isImportDeclaration(statement)) {
|
||||
const newStatement = processKitImportDeclaration(statement, needDeleteMap, needDeleteExportName);
|
||||
if (newStatement) {
|
||||
newStatements.push(newStatement);
|
||||
} else if (index === 0) {
|
||||
copyrightMessage = sourceFile.getFullText().replace(sourceFile.getText(), '');
|
||||
}
|
||||
} else if (ts.isExportDeclaration(statement)) {
|
||||
const exportSpecifiers = statement.exportClause.elements.filter((item) => {
|
||||
@ -106,7 +112,7 @@ function getKitNewSourceFile(sourceFile, kitName) {
|
||||
}
|
||||
});
|
||||
sourceFile = factory.updateSourceFile(sourceFile, newStatements);
|
||||
return sourceFile;
|
||||
return { sourceFile, copyrightMessage };
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user