-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🤖 Merge PR #56224 Add uuid-to-hex typings by @pmqueiroz
* Add uuid-to-hex typings * fix: function name * fix: typo on dt header * fix: prevent external dependency use
- Loading branch information
Showing
4 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Type definitions for uuid-to-hex 1.1 | ||
// Project: https://github.com/DeRain/uuid-to-hex | ||
// Definitions by: Pedro Queiroz <https://github.com/pmqueiroz> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
|
||
/** | ||
* Convert UUID string to hex string. | ||
* @param uuidString The input uuid. | ||
* @param addLeadingZero Identifies if you want the leading zero on return. | ||
*/ | ||
declare function uuidToHex(uuidString: string, addLeadingZero?: boolean): string; | ||
export = uuidToHex; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"lib": [ | ||
"es6" | ||
], | ||
"noImplicitAny": true, | ||
"noImplicitThis": true, | ||
"strictNullChecks": true, | ||
"strictFunctionTypes": true, | ||
"baseUrl": "../", | ||
"typeRoots": [ | ||
"../" | ||
], | ||
"types": [], | ||
"noEmit": true, | ||
"forceConsistentCasingInFileNames": true | ||
}, | ||
"files": [ | ||
"index.d.ts", | ||
"uuid-to-hex-tests.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "extends": "dtslint/dt.json" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import uuidToHex = require('uuid-to-hex'); | ||
|
||
// $ExpectType string | ||
uuidToHex('d3fd3540-6718-4687-956b-c8618a26e335'); | ||
|
||
// $ExpectType string | ||
uuidToHex('d3fd3540-6718-4687-956b-c8618a26e335', true); | ||
|
||
// $ExpectError | ||
uuidToHex(); |