!2788 修复未定义的类型

Merge pull request !2788 from onexiaomin/master
This commit is contained in:
openharmony_ci 2022-09-22 03:56:21 +00:00 committed by Gitee
commit 4bb3fd08fe
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 13 additions and 12 deletions

View File

@ -14,9 +14,9 @@
*/
import { AsyncCallback, Callback } from "./basic";
import { Want } from './ability/want';
import Want from './@ohos.application.Want';
import Context from './application/Context';
import Filter from '@ohos.fileio'
import { Filter } from './@ohos.fileio';
/**
* This module provides the capability to access user public files.
@ -74,7 +74,7 @@ declare namespace fileAccess {
* @param mode Indicates the mode of the file.
* @param size Indicates the size of the file.
* @param mtime Indicates the mtime of the file.
* @param mimetype Indicates the mimetype of the file.
* @param mimeType Indicates the mimeType of the file.
*/
interface FileInfo {
/**
@ -106,7 +106,7 @@ declare namespace fileAccess {
* @type {string}
* @readonly
*/
mimetype: string;
mimeType: string;
/**
* List files in the current directory.
@ -217,6 +217,7 @@ declare namespace fileAccess {
* @since 9
* @syscap SystemCapability.FileManagement.UserFileService
* @StageModelOnly
* @systemapi
*/
enum OPENFLAGS {
/** file is openFile only_read */

View File

@ -46,8 +46,8 @@ declare namespace fileExtensionInfo {
* @StageModelOnly
*/
namespace DeviceFlag {
const SUPPORTS_READ = 1;
const SUPPORTS_WRITE = 1 << 1;
const SUPPORTS_READ = 0b1;
const SUPPORTS_WRITE = 0b10;
}
/**
@ -58,10 +58,10 @@ declare namespace fileExtensionInfo {
* @StageModelOnly
*/
namespace DocumentFlag {
const REPRESENTS_FILE = 1;
const REPRESENTS_DIR = 1 << 1;
const SUPPORTS_READ = 1 << 2;
const SUPPORTS_WRITE = 1 << 3;
const REPRESENTS_FILE = 0b1;
const REPRESENTS_DIR = 0b10;
const SUPPORTS_READ = 0b100;
const SUPPORTS_WRITE = 0b1000;
}
}

View File

@ -84,7 +84,7 @@ declare namespace fileIO {
export { writeSync };
export { Dir };
export { Dirent };
export { Filter };
export { ReadOut };
export { Stat };
export { Stream };
@ -1156,7 +1156,7 @@ declare interface Dirent {
isSymbolicLink(): boolean;
}
declare interface Filter {
export type Filter = {
/**
* @type {Array<string>}
* @syscap SystemCapability.FileManagement.File.FileIO