Certain methods always return a specific Entry type. Define more
specific callbacks so that typescript can infer when an Entry is
a DirectoryEntry or FileEntry, removing the need to explicitly
state the type in certain callbacks.
Existing code using this definition should not be broken as a
result of this change.
Signed-off-by: David Li <jiawei.davidli@gmail.com>
This is specified in the official standard:
http://www.w3.org/TR/file-system-api/#the-filesystem-interface
Interestingly enough, these typings already specify the `root` of
FileSystemSync (the synchronous version of the API) to be a DirectorySync. This must have been an oversight of the original author of these typings.