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:
Piotr Błażejewicz (Peter Blazejewicz) 2020-09-24 22:48:26 +02:00 committed by GitHub
parent 52a1d17879
commit aa5ac1d7ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 73 deletions

View File

@ -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",

View File

@ -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;

View File

@ -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"
]
}

View File

@ -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
}
}

View File

@ -1,12 +0,0 @@
import username = require("username");
username()
.then((username) => {
username === "string";
})
.catch((err) => {
err === new Error();
});
username.sync() === "string";