mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
delete(username): remove definition (#48153)
Package ships its own d.ts file from v5.0.0: https://github.com/sindresorhus/username/releases/tag/v5.0.0 Thanks!
This commit is contained in:
parent
52a1d17879
commit
aa5ac1d7ab
@ -5604,6 +5604,12 @@
|
||||
"sourceRepoURL": "https://github.com/donavon/use-dark-mode#readme",
|
||||
"asOfVersion": "2.3.1"
|
||||
},
|
||||
{
|
||||
"libraryName": "username",
|
||||
"typingsPackageName": "username",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/username",
|
||||
"asOfVersion": "5.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "UUID.js",
|
||||
"typingsPackageName": "uuidjs",
|
||||
|
||||
27
types/username/index.d.ts
vendored
27
types/username/index.d.ts
vendored
@ -1,27 +0,0 @@
|
||||
// Type definitions for username v3.0.0
|
||||
// Project: https://www.npmjs.com/package/username
|
||||
// Definitions by: Klaus Reimer <https://github.com/kayahr>
|
||||
// Akos Krivachy <https://github.com/krivachy>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
|
||||
/**
|
||||
* Tries to get the username from the LOGNAME, USER, LNAME or USERNAME environment variables.
|
||||
* Falls back to `id -un` on OS X / Linux and `whoami` on Windows in the rare case none of the environment
|
||||
* variables are set. The result is cached.
|
||||
*
|
||||
* @return Promise<string> A promise containing the username or empty string if not found.
|
||||
*/
|
||||
declare function username(): Promise<string>;
|
||||
|
||||
declare namespace username {
|
||||
/**
|
||||
* Tries to get the username from the LOGNAME, USER, LNAME or USERNAME environment variables. Falls back
|
||||
* to returning an empty string in the reare case none of the environment variables are set.
|
||||
*
|
||||
* @return The username or empty string if not found.
|
||||
*/
|
||||
function sync(): string;
|
||||
}
|
||||
|
||||
export = username;
|
||||
@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"username-tests.ts"
|
||||
]
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"callable-types": false,
|
||||
"dt-header": false,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-redundant-jsdoc": false,
|
||||
"prefer-method-signature": false,
|
||||
"trim-file": false
|
||||
}
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
|
||||
import username = require("username");
|
||||
|
||||
username()
|
||||
.then((username) => {
|
||||
username === "string";
|
||||
})
|
||||
.catch((err) => {
|
||||
err === new Error();
|
||||
});
|
||||
|
||||
username.sync() === "string";
|
||||
Loading…
Reference in New Issue
Block a user