mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
[bs58] Update types to v4
This commit is contained in:
parent
17dbfc5595
commit
8ebdc9eaa4
8
types/bs58/bs58-tests.ts
Normal file
8
types/bs58/bs58-tests.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import bs58 = require('bs58');
|
||||
|
||||
const bytes = Buffer.from('003c176e659bea0f29a3e9bf7880c112b1b31b4dc826268187', 'hex');
|
||||
const address = bs58.encode(bytes);
|
||||
address; // $ExpectType string
|
||||
|
||||
bs58.decode(address); // $ExpectType Buffer
|
||||
bs58.decodeUnsafe(address); // $ExpectType Buffer | undefined
|
||||
11
types/bs58/index.d.ts
vendored
Normal file
11
types/bs58/index.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Type definitions for bs58 4.0
|
||||
// Project: https://github.com/cryptocoinjs/bs58
|
||||
// Definitions by: Ilya Mochalov <https://github.com/chrootsu>
|
||||
// BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { BaseConverter } from 'base-x';
|
||||
|
||||
declare const base58: BaseConverter;
|
||||
|
||||
export = base58;
|
||||
23
types/bs58/tsconfig.json
Normal file
23
types/bs58/tsconfig.json
Normal file
@ -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",
|
||||
"bs58-tests.ts"
|
||||
]
|
||||
}
|
||||
3
types/bs58/tslint.json
Normal file
3
types/bs58/tslint.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import * as bs58 from 'bs58';
|
||||
|
||||
{
|
||||
@ -8,4 +7,4 @@ import * as bs58 from 'bs58';
|
||||
encoded = bs58.encode({0: 255, length: 1});
|
||||
}
|
||||
|
||||
let decoded: number[] = bs58.decode('5Q');
|
||||
const decoded: number[] = bs58.decode('5Q');
|
||||
|
||||
2
types/bs58/v3/index.d.ts
vendored
2
types/bs58/v3/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for bs58 3.0.0
|
||||
// Type definitions for bs58 3.0
|
||||
// Project: https://github.com/cryptocoinjs/bs58
|
||||
// Definitions by: Ilya Mochalov <https://github.com/chrootsu>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../../",
|
||||
"typeRoots": [
|
||||
|
||||
@ -1,79 +1,3 @@
|
||||
{
|
||||
"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,
|
||||
"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
|
||||
}
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user