Skip to content
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 private/metro-memory-fs/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@ type Encoding =
| 'utf8';

type Resolution = {
+basename: string,
+dirNode: DirectoryNode,
+dirPath: Array<[string, EntityNode]>,
+drive: string,
+node: ?EntityNode,
+realpath: string,
readonly basename: string,
readonly dirNode: DirectoryNode,
readonly dirPath: Array<[string, EntityNode]>,
readonly drive: string,
readonly node: ?EntityNode,
readonly realpath: string,
};

type Descriptor = {
+nodePath: Array<[string, EntityNode]>,
+node: FileNode,
+readable: boolean,
+writable: boolean,
readonly nodePath: Array<[string, EntityNode]>,
readonly node: FileNode,
readonly readable: boolean,
readonly writable: boolean,
position: number,
};

Expand Down Expand Up @@ -1272,8 +1272,8 @@ class MemoryFs {
}

_parsePath(filePath: string): {
+drive: ?string,
+entNames: Array<string>,
readonly drive: ?string,
readonly entNames: Array<string>,
} {
let drive;
const sep = this._platform === 'win32' ? /[\\/]/ : /\//;
Expand All @@ -1297,8 +1297,8 @@ class MemoryFs {
}

_parsePathWithCwd(filePath: string): {
+drive: string,
+entNames: Array<string>,
readonly drive: string,
readonly entNames: Array<string>,
} {
let {drive, entNames} = this._parsePath(filePath);
if (drive == null) {
Expand Down Expand Up @@ -1744,8 +1744,8 @@ class FSWatcher extends EventEmitter {
}

class Dirent {
+_stats: Stats;
+name: string | Buffer;
readonly _stats: Stats;
readonly name: string | Buffer;

/**
* Don't keep a reference to the node as it may get mutated over time.
Expand Down
Loading