mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
Add types for expand-tilde closes jonschlinkert/expand-tilde#3
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
import expandTilde = require("expand-tilde");
|
||||
|
||||
expandTilde("~") // $ExpectType string
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
// Type definitions for expand-tilde 2.0
|
||||
// Project: https://github.com/jonschlinkert/expand-tilde
|
||||
// Definitions by: Chris Arnesen <https://github.com/carnesen>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
|
||||
/**
|
||||
* Bash-like tilde expansion for node.js.
|
||||
* Expands a leading tilde (~) in a file path to the user home directory, or ~+ to the cwd.
|
||||
*
|
||||
* @param {string} filePath - a file path to expand
|
||||
* @returns {string} the expanded file path
|
||||
*/
|
||||
declare function expandTilde(filePath: string): string;
|
||||
|
||||
export = expandTilde;
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"expand-tilde-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user