Skip to content

Commit

Permalink
Correct type guard for FileStat.is
Browse files Browse the repository at this point in the history
Signed-off-by: Nigel Westbury <nigelipse@miegel.org>
  • Loading branch information
Nigel Westbury committed Jan 25, 2021
1 parent 4204297 commit f7ab84f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/filesystem/src/common/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export interface FileStat extends BaseStat {
children?: FileStat[];
}
export namespace FileStat {
export function is(arg: Object | undefined): arg is BaseStat {
export function is(arg: Object | undefined): arg is FileStat {
return BaseStat.is(arg) &&
('isFile' in arg && typeof arg['isFile'] === 'boolean') &&
('isDirectory' in arg && typeof arg['isDirectory'] === 'boolean') &&
Expand Down

0 comments on commit f7ab84f

Please sign in to comment.