2021-10-20 18:57:17 +08:00
|
|
|
import { Modeling } from "./types";
|
|
|
|
export declare abstract class Resource implements Modeling {
|
|
|
|
type: string;
|
|
|
|
identifier: string;
|
2021-11-18 17:39:01 +08:00
|
|
|
resId: string;
|
2021-10-20 18:57:17 +08:00
|
|
|
constructor(type: string, identifier: string);
|
|
|
|
toModel(): {
|
2021-11-18 17:39:01 +08:00
|
|
|
resId: string;
|
2021-10-20 18:57:17 +08:00
|
|
|
type: string;
|
|
|
|
identifier: string;
|
|
|
|
};
|
|
|
|
}
|
2021-10-25 16:01:44 +08:00
|
|
|
export declare class LocalResource extends Resource {
|
2021-10-20 18:57:17 +08:00
|
|
|
constructor(path: string);
|
|
|
|
}
|
|
|
|
export declare class RemoteResource extends Resource {
|
|
|
|
constructor(url: string);
|
|
|
|
}
|
2021-10-22 17:00:00 +08:00
|
|
|
export declare class Base64Resource extends Resource {
|
2021-10-25 16:01:44 +08:00
|
|
|
constructor(content: string);
|
2021-10-22 17:00:00 +08:00
|
|
|
}
|
2021-12-07 18:38:05 +08:00
|
|
|
/**
|
|
|
|
* Resources belong to assets dir.
|
|
|
|
*/
|
2021-12-07 19:13:42 +08:00
|
|
|
export declare class AssetsResource extends Resource {
|
2021-12-07 18:38:05 +08:00
|
|
|
constructor(content: string);
|
|
|
|
}
|
|
|
|
export declare class AndroidResource extends Resource {
|
|
|
|
}
|
|
|
|
export declare class iOSResource extends Resource {
|
|
|
|
}
|
2021-10-20 18:57:17 +08:00
|
|
|
/**
|
|
|
|
* This is for android platform
|
|
|
|
*/
|
2021-12-07 18:38:05 +08:00
|
|
|
export declare class DrawableResource extends AndroidResource {
|
2021-10-25 16:01:44 +08:00
|
|
|
constructor(name: string);
|
2021-10-20 18:57:17 +08:00
|
|
|
}
|
2021-12-07 18:38:05 +08:00
|
|
|
export declare class RawResource extends AndroidResource {
|
2021-10-25 16:01:44 +08:00
|
|
|
constructor(name: string);
|
2021-10-22 17:00:00 +08:00
|
|
|
}
|
2021-12-07 18:38:05 +08:00
|
|
|
export declare class AndroidAssetsResource extends AndroidResource {
|
2021-10-20 18:57:17 +08:00
|
|
|
constructor(path: string);
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* This is for iOS platform
|
|
|
|
*/
|
2021-12-07 18:38:05 +08:00
|
|
|
export declare class MainBundleResource extends iOSResource {
|
2021-10-25 16:51:45 +08:00
|
|
|
constructor(fileName: string);
|
|
|
|
}
|
2021-12-07 18:38:05 +08:00
|
|
|
export declare class BundleResource extends iOSResource {
|
2021-10-25 16:51:45 +08:00
|
|
|
constructor(bundleName: string, fileName: string);
|
2021-10-20 18:57:17 +08:00
|
|
|
}
|
2022-03-09 17:35:13 +08:00
|
|
|
export declare class ArrayBufferResource extends Resource {
|
|
|
|
data: ArrayBuffer;
|
|
|
|
constructor(data: ArrayBuffer);
|
|
|
|
toModel(): {
|
|
|
|
resId: string;
|
|
|
|
type: string;
|
|
|
|
identifier: string;
|
|
|
|
};
|
|
|
|
}
|