mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 08:17:05 +00:00
keytar: Provides its own types (#39447)
This commit is contained in:
committed by
Jesse Trinity
parent
e04a56b56c
commit
3601ec8d18
@@ -2016,6 +2016,12 @@
|
||||
"sourceRepoURL": "https://github.com/keycloak/keycloak",
|
||||
"asOfVersion": "3.4.1"
|
||||
},
|
||||
{
|
||||
"libraryName": "keytar",
|
||||
"typingsPackageName": "keytar",
|
||||
"sourceRepoURL": "http://atom.github.io/node-keytar/",
|
||||
"asOfVersion": "4.4.2"
|
||||
},
|
||||
{
|
||||
"libraryName": "knex",
|
||||
"typingsPackageName": "knex",
|
||||
|
||||
Vendored
-57
@@ -1,57 +0,0 @@
|
||||
// Type definitions for keytar 4.4.1
|
||||
// Project: http://atom.github.io/node-keytar/
|
||||
// Definitions by: Milan Burda <https://github.com/miniak>
|
||||
// Brendan Forster <https://github.com/shiftkey>
|
||||
// Hari Juturu <https://github.com/juturu>
|
||||
// Queenie Ma <https://github.com/queeniema>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
|
||||
/**
|
||||
* Get the stored password for the service and account.
|
||||
*
|
||||
* @param service The string service name.
|
||||
* @param account The string account name.
|
||||
*
|
||||
* @returns A promise for the password string.
|
||||
*/
|
||||
export declare function getPassword(service: string, account: string): Promise<string | null>;
|
||||
|
||||
/**
|
||||
* Save the password for the service and account to the keychain. Adds a new entry if necessary, or updates an existing entry if one exists.
|
||||
*
|
||||
* @param service The string service name.
|
||||
* @param account The string account name.
|
||||
* @param password The string password.
|
||||
*
|
||||
* @returns A promise for the set password completion.
|
||||
*/
|
||||
export declare function setPassword(service: string, account: string, password: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Delete the stored password for the service and account.
|
||||
*
|
||||
* @param service The string service name.
|
||||
* @param account The string account name.
|
||||
*
|
||||
* @returns A promise for the deletion status. True on success.
|
||||
*/
|
||||
export declare function deletePassword(service: string, account: string): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Find all accounts and password for the service in the keychain.
|
||||
*
|
||||
* @param service The string service name.
|
||||
*
|
||||
* @returns A promise for the credentials array.
|
||||
*/
|
||||
export declare function findCredentials(service: string): Promise<Array<{ account: string, password: string }>>;
|
||||
|
||||
/**
|
||||
* Find a password for the service in the keychain. This is ideal for scenarios where an account is not required.
|
||||
*
|
||||
* @param service The string service name.
|
||||
*
|
||||
* @returns A promise for the password string.
|
||||
*/
|
||||
export declare function findPassword(service: string): Promise<string | null>;
|
||||
@@ -1,15 +0,0 @@
|
||||
|
||||
import keytar = require('keytar');
|
||||
|
||||
let setResult: Promise<void>;
|
||||
setResult = keytar.setPassword('keytar-tests', 'username', 'password');
|
||||
|
||||
let success: Promise<boolean>;
|
||||
success = keytar.deletePassword('keytar-tests', 'username');
|
||||
|
||||
let password: Promise<string | null>;
|
||||
password = keytar.findPassword('keytar-tests');
|
||||
password = keytar.getPassword('keytar-tests', 'username');
|
||||
|
||||
let credentials: Promise<Array<{ account: string, password: string }>>;
|
||||
credentials = keytar.findCredentials('keytar-tests');
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"keytar-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"adjacent-overload-signatures": false,
|
||||
"array-type": false,
|
||||
"arrow-return-shorthand": false,
|
||||
"ban-types": false,
|
||||
"callable-types": false,
|
||||
"comment-format": false,
|
||||
"dt-header": false,
|
||||
"npm-naming": false,
|
||||
"eofline": false,
|
||||
"export-just-namespace": false,
|
||||
"import-spacing": false,
|
||||
"interface-name": false,
|
||||
"interface-over-type-literal": false,
|
||||
"jsdoc-format": false,
|
||||
"max-line-length": false,
|
||||
"member-access": false,
|
||||
"new-parens": false,
|
||||
"no-any-union": false,
|
||||
"no-boolean-literal-compare": false,
|
||||
"no-conditional-assignment": false,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-construct": false,
|
||||
"no-declare-current-package": false,
|
||||
"no-duplicate-imports": false,
|
||||
"no-duplicate-variable": false,
|
||||
"no-empty-interface": false,
|
||||
"no-for-in-array": false,
|
||||
"no-inferrable-types": false,
|
||||
"no-internal-module": false,
|
||||
"no-irregular-whitespace": false,
|
||||
"no-mergeable-namespace": false,
|
||||
"no-misused-new": false,
|
||||
"no-namespace": false,
|
||||
"no-object-literal-type-assertion": false,
|
||||
"no-padding": false,
|
||||
"no-redundant-jsdoc": false,
|
||||
"no-redundant-jsdoc-2": false,
|
||||
"no-redundant-undefined": false,
|
||||
"no-reference-import": false,
|
||||
"no-relative-import-in-test": false,
|
||||
"no-self-import": false,
|
||||
"no-single-declare-module": false,
|
||||
"no-string-throw": false,
|
||||
"no-unnecessary-callback-wrapper": false,
|
||||
"no-unnecessary-class": false,
|
||||
"no-unnecessary-generics": false,
|
||||
"no-unnecessary-qualifier": false,
|
||||
"no-unnecessary-type-assertion": false,
|
||||
"no-useless-files": false,
|
||||
"no-var-keyword": false,
|
||||
"no-var-requires": false,
|
||||
"no-void-expression": false,
|
||||
"no-trailing-whitespace": false,
|
||||
"object-literal-key-quotes": false,
|
||||
"object-literal-shorthand": false,
|
||||
"one-line": false,
|
||||
"one-variable-per-declaration": false,
|
||||
"only-arrow-functions": false,
|
||||
"prefer-conditional-expression": false,
|
||||
"prefer-const": false,
|
||||
"prefer-declare-function": false,
|
||||
"prefer-for-of": false,
|
||||
"prefer-method-signature": false,
|
||||
"prefer-template": false,
|
||||
"radix": false,
|
||||
"semicolon": false,
|
||||
"space-before-function-paren": false,
|
||||
"space-within-parens": false,
|
||||
"strict-export-declare-modifiers": false,
|
||||
"trim-file": false,
|
||||
"triple-equals": false,
|
||||
"typedef-whitespace": false,
|
||||
"unified-signatures": false,
|
||||
"void-return": false,
|
||||
"whitespace": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user