mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-22 01:19:36 +08:00
refractor(): change return type of writeFile
This commit is contained in:
parent
78b3ec5b1f
commit
156328c9de
@ -671,7 +671,7 @@ export class File {
|
|||||||
* @returns {Promise<FileEntry>} Returns a Promise that resolves to updated file entry or rejects with an error.
|
* @returns {Promise<FileEntry>} Returns a Promise that resolves to updated file entry or rejects with an error.
|
||||||
*/
|
*/
|
||||||
static writeFile(path: string, fileName: string,
|
static writeFile(path: string, fileName: string,
|
||||||
text: string | Blob, options: WriteOptions = {}): Promise<void> {
|
text: string | Blob, options: WriteOptions = {}): Promise<any> {
|
||||||
if ((/^\//.test(fileName))) {
|
if ((/^\//.test(fileName))) {
|
||||||
const err = new FileError(5);
|
const err = new FileError(5);
|
||||||
err.message = 'file-name cannot start with \/';
|
err.message = 'file-name cannot start with \/';
|
||||||
|
Loading…
Reference in New Issue
Block a user