mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-10-07 14:13:45 +00:00
错误码描述修改
Signed-off-by: zzs110 <zhouzishuai@huawei.com>
This commit is contained in:
parent
b843084af5
commit
dd558f694b
20
api/@ohos.pasteboard.d.ts
vendored
20
api/@ohos.pasteboard.d.ts
vendored
@ -341,7 +341,7 @@ declare namespace pasteboard {
|
||||
* @param { string } mimeType - indicates the MIME type of value.
|
||||
* @param { ValueType } value - content to be saved.
|
||||
* @throws { BusinessError } 401 - if type of mimeType is not string, or the value can not match the mimeType correctly.
|
||||
* @throws { BusinessError } 12900002 - if the count of records in PasteData exceeds MAX_RECORD_NUM.
|
||||
* @throws { BusinessError } 12900002 - The number of record exteeds the maximum limit.
|
||||
* @since 9
|
||||
*/
|
||||
addRecord(mimeType: string, value: ValueType): void;
|
||||
@ -425,7 +425,7 @@ declare namespace pasteboard {
|
||||
* @param { number } index - indicates the record index in PasteData.
|
||||
* @returns { PasteDataRecord } the record in PasteData with index.
|
||||
* @throws { BusinessError } 401 - if type of index is not number.
|
||||
* @throws { BusinessError } 12900001 - if index is out of the record count of PasteData.
|
||||
* @throws { BusinessError } 12900001 - The index is out of the record.
|
||||
* @since 9
|
||||
*/
|
||||
getRecord(index: number): PasteDataRecord;
|
||||
@ -477,7 +477,7 @@ declare namespace pasteboard {
|
||||
* Removes a Record based on a specified index.
|
||||
* @param { number } index - indicates the record index in PasteData.
|
||||
* @throws { BusinessError } 401 - if type of index is not number.
|
||||
* @throws { BusinessError } 12900001 - if index is out of the record count of PasteData.
|
||||
* @throws { BusinessError } 12900001 - The index is out of the record.
|
||||
* @since 9
|
||||
*/
|
||||
removeRecord(index: number): void;
|
||||
@ -497,7 +497,7 @@ declare namespace pasteboard {
|
||||
* @param { number } index - indicates the record index in PasteData.
|
||||
* @param { PasteDataRecord } record - the content of a new record.
|
||||
* @throws { BusinessError } 401 - if type of index is not number or type of record is not PasteDataRecord.
|
||||
* @throws { BusinessError } 12900001 - if index is out of the record count of PasteData.
|
||||
* @throws { BusinessError } 12900001 - The index is out of the record.
|
||||
* @since 9
|
||||
*/
|
||||
replaceRecord(index: number, record: PasteDataRecord): void;
|
||||
@ -559,7 +559,7 @@ declare namespace pasteboard {
|
||||
* Gets pastedata from the system pasteboard.
|
||||
* @param { AsyncCallback<PasteData> } callback - the callback of getData.
|
||||
* @throws { BusinessError } 401 - if type of callback is not AsyncCallback<PasteData>.
|
||||
* @throws { BusinessError } 12900003 - if another getData is being processed.
|
||||
* @throws { BusinessError } 12900003 - Another copy or paste is in progress.
|
||||
* @since 9
|
||||
*/
|
||||
getData(callback: AsyncCallback<PasteData>): void;
|
||||
@ -567,7 +567,7 @@ declare namespace pasteboard {
|
||||
/**
|
||||
* Gets pastedata from the system pasteboard.
|
||||
* @returns { Promise<PasteData> } the promise returned by the getData.
|
||||
* @throws { BusinessError } 12900003 - if another getData is being processed.
|
||||
* @throws { BusinessError } 12900003 - Another copy or paste is in progress.
|
||||
* @since 9
|
||||
*/
|
||||
getData(): Promise<PasteData>;
|
||||
@ -612,8 +612,8 @@ declare namespace pasteboard {
|
||||
* @param { PasteData } data - PasteData will be written to the clipboard
|
||||
* @param { AsyncCallback<void> } callback - the callback of setData.
|
||||
* @throws { BusinessError } 401 - if type of data is not PasteData or type of callback is not AsyncCallback<void>.
|
||||
* @throws { BusinessError } 12900003 - if another setData is being processed.
|
||||
* @throws { BusinessError } 12900004 - if the system prohibits copying.
|
||||
* @throws { BusinessError } 12900003 - Another copy or paste is in progress.
|
||||
* @throws { BusinessError } 12900004 - Replication is prohibited.
|
||||
* @since 9
|
||||
*/
|
||||
setData(data: PasteData, callback: AsyncCallback<void>): void;
|
||||
@ -623,8 +623,8 @@ declare namespace pasteboard {
|
||||
* @param { PasteData } data - PasteData will be written to the clipboard.
|
||||
* @returns { Promise<void> } the promise returned by the function.
|
||||
* @throws { BusinessError } 401 - if type of data is not PasteData.
|
||||
* @throws { BusinessError } 12900003 - if another setData is being processed.
|
||||
* @throws { BusinessError } 12900004 - if the system prohibits copying.
|
||||
* @throws { BusinessError } 12900003 - Another copy or paste is in progress.
|
||||
* @throws { BusinessError } 12900004 - Replication is prohibited.
|
||||
* @since 9
|
||||
*/
|
||||
setData(data: PasteData): Promise<void>;
|
||||
|
Loading…
Reference in New Issue
Block a user