Skip to content

Commit

Permalink
[vinyl][vinyl-file] Fix 5.5 nightly errors (DefinitelyTyped#69319)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabritto authored Apr 15, 2024
1 parent 4bb4074 commit 0c50781
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
15 changes: 0 additions & 15 deletions types/vinyl-file/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,6 @@ export interface VinylFileOptions {
read?: boolean | undefined;
}
export interface VinylFile extends File {
/** Returns true if the file contents are a Buffer, otherwise false */
isStream: () => boolean;

/** Returns true if the file contents are a Stream, otherwise false */
isBuffer: () => boolean;

/** Returns true if the file contents are null, otherwise false */
isNull: () => boolean;

/** Returns true if the file represents a directory, otherwise false */
isDirectory: () => boolean;

/** Returns true if the file represents a symbolic link, otherwise false */
isSymbolic: () => boolean;

/** Returns a new Vinyl object with all attributes cloned. */
clone(opts?: { contents?: boolean | undefined; deep?: boolean | undefined } | boolean): this;

Expand Down
5 changes: 0 additions & 5 deletions types/vinyl/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,15 +335,13 @@ declare namespace File {
interface BufferFile extends File {
contents: Buffer;
isStream(): this is never;
isBuffer(): true;
isNull(): this is never;
isDirectory(): this is never;
isSymbolic(): this is never;
}

interface StreamFile extends File {
contents: NodeJS.ReadableStream;
isStream(): true;
isBuffer(): this is never;
isNull(): this is never;
isDirectory(): this is never;
Expand All @@ -354,18 +352,15 @@ declare namespace File {
contents: null;
isStream(): this is never;
isBuffer(): this is never;
isNull(): true;
isDirectory(): this is DirectoryFile;
isSymbolic(): this is SymbolicFile;
}

interface DirectoryFile extends NullFile {
isDirectory(): true;
isSymbolic(): this is never;
}

interface SymbolicFile extends NullFile {
isDirectory(): this is never;
isSymbolic(): true;
}
}

0 comments on commit 0c50781

Please sign in to comment.