Comparing version 7.2.2 to 7.2.3
@@ -37,12 +37,22 @@ /// <reference types="node" /> | ||
): VFile | ||
export const read: { | ||
(description: Compatible, options: ReadOptions, callback: Callback): void | ||
(description: Compatible, callback: Callback): void | ||
(description: Compatible, options?: ReadOptions): Promise<VFile> | ||
} | ||
export const write: { | ||
(description: Compatible, options: WriteOptions, callback: Callback): void | ||
(description: Compatible, callback: Callback): void | ||
(description: Compatible, options?: WriteOptions): Promise<VFile> | ||
} | ||
export function read( | ||
description: Compatible, | ||
options: ReadOptions, | ||
callback: Callback | ||
): void | ||
export function read(description: Compatible, callback: Callback): void | ||
export function read( | ||
description: Compatible, | ||
options?: ReadOptions | ||
): Promise<VFile> | ||
export function write( | ||
description: Compatible, | ||
options: WriteOptions, | ||
callback: Callback | ||
): void | ||
export function write(description: Compatible, callback: Callback): void | ||
export function write( | ||
description: Compatible, | ||
options?: WriteOptions | ||
): Promise<VFile> | ||
export type Value = import('vfile').VFileValue | ||
@@ -67,4 +77,5 @@ export type Options = import('vfile').VFileOptions | ||
* Path of the file. | ||
* Note: `Value` is used here because it’s a smarter `Buffer` | ||
*/ | ||
export type Path = string | Uint8Array | ||
export type Path = URL | Value | ||
/** | ||
@@ -74,3 +85,3 @@ * Things that can be | ||
*/ | ||
export type Compatible = Path | URL | Options | VFile | ||
export type Compatible = Path | Options | VFile | ||
export type Callback = ( | ||
@@ -77,0 +88,0 @@ error: NodeJS.ErrnoException | null, |
@@ -10,4 +10,5 @@ /** | ||
* | ||
* @typedef {string|Uint8Array} Path Path of the file. | ||
* @typedef {Path|URL|Options|VFile} Compatible Things that can be | ||
* @typedef {URL|Value} Path Path of the file. | ||
* Note: `Value` is used here because it’s a smarter `Buffer` | ||
* @typedef {Path|Options|VFile} Compatible Things that can be | ||
* passed to the function. | ||
@@ -14,0 +15,0 @@ */ |
{ | ||
"name": "to-vfile", | ||
"version": "7.2.2", | ||
"version": "7.2.3", | ||
"description": "vfile utility to create a vfile from a filepath", | ||
@@ -51,3 +51,3 @@ "license": "MIT", | ||
"typescript": "^4.0.0", | ||
"xo": "^0.44.0" | ||
"xo": "^0.47.0" | ||
}, | ||
@@ -54,0 +54,0 @@ "scripts": { |
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
16465
305