diff --git a/types/index.d.ts b/types/index.d.ts index 469d8621b..a8970360a 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -6,7 +6,7 @@ // Copyright (c) Microsoft Open Technologies, Inc. // Licensed under the MIT license. -interface Window { +export interface Window { /** * Requests a filesystem in which to store application data. * @param type Whether the filesystem requested should be persistent, as defined above. Use one of TEMPORARY or PERSISTENT. @@ -42,7 +42,7 @@ interface Window { } /** This interface represents a file system. */ -interface FileSystem { +export interface FileSystem { /* The name of the file system, unique across the list of exposed file systems. */ name: string; /** The root directory of the file system. */ @@ -53,7 +53,7 @@ interface FileSystem { * An abstract interface representing entries in a file system, * each of which may be a File or DirectoryEntry. */ -interface Entry { +export interface Entry { /** Entry is a file. */ isFile: boolean; /** Entry is a directory. */ @@ -137,7 +137,7 @@ interface Entry { } /** This interface supplies information about the state of a file or directory. */ -interface Metadata { +export interface Metadata { /** This is the time at which the file or directory was last modified. */ modificationTime: Date; /** The size of the file, in bytes. This must return 0 for directories. */ @@ -145,7 +145,7 @@ interface Metadata { } /** This interface represents a directory on a file system. */ -interface DirectoryEntry extends Entry { +export interface DirectoryEntry extends Entry { /** * Creates a new DirectoryReader to read Entries from this Directory. */ @@ -197,7 +197,7 @@ interface DirectoryEntry extends Entry { * This dictionary is used to supply arguments to methods * that look up or create files or directories. */ -interface Flags { +export interface Flags { /** Used to indicate that the user wants to create a file or directory if it was not previously there. */ create?: boolean; /** By itself, exclusive must have no effect. Used with create, it must cause getFile and getDirectory to fail if the target path already exists. */ @@ -213,7 +213,7 @@ interface Flags { * If not all entries have been returned, the array produced by readEntries must not be empty. * The entries produced by readEntries must not include the directory itself ["."] or its parent [".."]. */ -interface DirectoryReader { +export interface DirectoryReader { /** * Read the next block of entries from this directory. * @param successCallback Called once per successful call to readEntries to deliver the next @@ -228,7 +228,7 @@ interface DirectoryReader { } /** This interface represents a file on a file system. */ -interface FileEntry extends Entry { +export interface FileEntry extends Entry { /** * Creates a new FileWriter associated with the file that this FileEntry represents. * @param successCallback A callback that is called with the new FileWriter. @@ -250,7 +250,7 @@ interface FileEntry extends Entry { * This interface provides methods to monitor the asynchronous writing of blobs * to disk using progress events and event handler attributes. */ -interface FileSaver extends EventTarget { +export interface FileSaver extends EventTarget { /** Terminate file operation */ abort(): void; /** @@ -281,7 +281,7 @@ interface FileSaver extends EventTarget { * This interface expands on the FileSaver interface to allow for multiple write * actions, rather than just saving a single Blob. */ -interface FileWriter extends FileSaver { +export interface FileWriter extends FileSaver { /** * The byte offset at which the next write to the file will occur. This always less or equal than length. * A newly-created FileWriter will have position set to 0. @@ -312,18 +312,18 @@ interface FileWriter extends FileSaver { } /* FileWriter states */ -declare var FileWriter: { +export declare var FileWriter: { INIT: number; WRITING: number; DONE: number }; -interface FileError { +export interface FileError { /** Error code */ code: number; } -declare var FileError: { +export declare var FileError: { new (code: number): FileError; NOT_FOUND_ERR: number; SECURITY_ERR: number; @@ -342,7 +342,7 @@ declare var FileError: { /* * Constants defined in fileSystemPaths */ -interface Cordova { +export interface Cordova { file: { /* Read-only directory where the application is installed. */ applicationDirectory: string; @@ -372,7 +372,7 @@ interface Cordova { } -declare enum LocalFileSystem { +export declare enum LocalFileSystem { PERSISTENT=1, TEMPORARY=0 -} \ No newline at end of file +}