Change type of path.sep and path.delimiter in @types/node (#24833)

* Update type of path.sep and path.delimiter

* Change `path.sep` to `'\\' | '/'`
* Change `path.delimiter` to  `';' | ':'`

* Update index.d.ts

* Change types of path.sep and path.delimiter in types/node/{v8,v6}

* Change types of path.sep and path.delimiter in types/node/v7
This commit is contained in:
Khải
2018-04-10 03:52:55 +07:00
committed by Mohamed Hegazy
parent c701072a0e
commit 52670470e3
4 changed files with 12 additions and 8 deletions

View File

@@ -20,6 +20,7 @@
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/** inspector module types */
@@ -4683,11 +4684,11 @@ declare module "path" {
/**
* The platform-specific file separator. '\\' or '/'.
*/
export var sep: string;
export var sep: '\\' | '/';
/**
* The platform-specific file delimiter. ';' or ':'.
*/
export var delimiter: string;
export var delimiter: ';' | ':';
/**
* Returns an object from a path string - the opposite of format().
*

View File

@@ -6,6 +6,7 @@
// Thomas Bouldin <https://github.com/inlined>
// Sebastian Silbermann <https://github.com/eps1lon>
// Alorel <https://github.com/Alorel>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/************************************************
@@ -3003,11 +3004,11 @@ declare module "path" {
/**
* The platform-specific file separator. '\\' or '/'.
*/
export var sep: string;
export var sep: '\\' | '/';
/**
* The platform-specific file delimiter. ';' or ':'.
*/
export var delimiter: string;
export var delimiter: ';' | ':';
/**
* Returns an object from a path string - the opposite of format().
*

View File

@@ -6,6 +6,7 @@
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/************************************************
@@ -3092,11 +3093,11 @@ declare module "path" {
/**
* The platform-specific file separator. '\\' or '/'.
*/
export var sep: string;
export var sep: '\\' | '/';
/**
* The platform-specific file delimiter. ';' or ':'.
*/
export var delimiter: string;
export var delimiter: ';' | ':';
/**
* Returns an object from a path string - the opposite of format().
*

View File

@@ -19,6 +19,7 @@
// Alberto Schiabel <https://github.com/jkomyno>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
@@ -4662,11 +4663,11 @@ declare module "path" {
/**
* The platform-specific file separator. '\\' or '/'.
*/
export var sep: string;
export var sep: '\\' | '/';
/**
* The platform-specific file delimiter. ';' or ':'.
*/
export var delimiter: string;
export var delimiter: ';' | ':';
/**
* Returns an object from a path string - the opposite of format().
*