Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added export for types #285

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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. */
Expand All @@ -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. */
Expand Down Expand Up @@ -137,15 +137,15 @@ 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. */
size: number;
}

/** 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.
*/
Expand Down Expand Up @@ -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. */
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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;
/**
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -372,7 +372,7 @@ interface Cordova {
}


declare enum LocalFileSystem {
export declare enum LocalFileSystem {
PERSISTENT=1,
TEMPORARY=0
}
}