@types/vinyl
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -55,5 +55,7 @@ // Type definitions for vinyl 2.0 | ||
interface FileConstructor { | ||
new (options: ConstructorOptions & { contents: null }): NullFile; | ||
new (options: ConstructorOptions & { contents: Buffer }): BufferFile; | ||
new (options: ConstructorOptions & { contents: NodeJS.ReadableStream }): StreamFile; | ||
new (options: ConstructorOptions & { contents: null }): File.NullFile; | ||
new (options: ConstructorOptions & { contents: Buffer }): File.BufferFile; | ||
new ( | ||
options: ConstructorOptions & { contents: NodeJS.ReadableStream } | ||
): File.StreamFile; | ||
new (options?: ConstructorOptions): File; | ||
@@ -261,3 +263,3 @@ | ||
*/ | ||
isBuffer(): this is BufferFile; | ||
isBuffer(): this is File.BufferFile; | ||
@@ -267,3 +269,3 @@ /** | ||
*/ | ||
isStream(): this is StreamFile; | ||
isStream(): this is File.StreamFile; | ||
@@ -273,3 +275,3 @@ /** | ||
*/ | ||
isNull(): this is NullFile; | ||
isNull(): this is File.NullFile; | ||
@@ -288,3 +290,3 @@ /** | ||
*/ | ||
isDirectory(): this is DirectoryFile; | ||
isDirectory(): this is File.DirectoryFile; | ||
@@ -303,3 +305,3 @@ /** | ||
*/ | ||
isSymbolic(): this is SymbolicFile; | ||
isSymbolic(): this is File.SymbolicFile; | ||
@@ -337,42 +339,45 @@ /** | ||
end?: boolean; | ||
}): T; | ||
} | ||
): T; | ||
} | ||
// See https://github.com/Microsoft/TypeScript/issues/11796 | ||
declare namespace File { | ||
// See https://github.com/Microsoft/TypeScript/issues/11796 | ||
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 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; | ||
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; | ||
isSymbolic(): this is never; | ||
} | ||
interface NullFile extends File { | ||
contents: null; | ||
isStream(): this is never; | ||
isBuffer(): this is never; | ||
isNull(): true; | ||
isDirectory(): this is DirectoryFile; | ||
isSymbolic(): this is SymbolicFile; | ||
} | ||
interface NullFile extends 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 DirectoryFile extends NullFile { | ||
isDirectory(): true; | ||
isSymbolic(): this is never; | ||
} | ||
interface SymbolicFile extends NullFile { | ||
isDirectory(): this is never; | ||
isSymbolic(): true; | ||
interface SymbolicFile extends NullFile { | ||
isDirectory(): this is never; | ||
isSymbolic(): true; | ||
} | ||
} |
{ | ||
"name": "@types/vinyl", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "TypeScript definitions for vinyl", | ||
@@ -24,5 +24,7 @@ "license": "MIT", | ||
"main": "", | ||
"types": "index", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", | ||
"directory": "types/vinyl" | ||
}, | ||
@@ -33,4 +35,4 @@ "scripts": {}, | ||
}, | ||
"typesPublisherContentHash": "b53d89f08676c28e6e767716f404ded121530be93c17f1ee1545509826c3832e", | ||
"typesPublisherContentHash": "741fe93f83b54ea143fd1f9198098ab0ee13059681b1e1bb7f07adc6232713e9", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -5,10 +5,10 @@ # Installation | ||
# Summary | ||
This package contains type definitions for vinyl (https://github.com/gulpjs/vinyl). | ||
This package contains type definitions for vinyl ( https://github.com/gulpjs/vinyl ). | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/vinyl | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/vinyl | ||
Additional Details | ||
* Last updated: Sat, 23 Dec 2017 16:04:56 GMT | ||
* Dependencies: fs, node | ||
* Last updated: Wed, 10 Apr 2019 16:24:40 GMT | ||
* Dependencies: @types/node | ||
* Global values: none | ||
@@ -15,0 +15,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13569
334