Browse Source

Fix lint types.ts

fixTypes
junderw 6 years ago
parent
commit
7fb859b1f7
No known key found for this signature in database GPG Key ID: B256185D3A971908
  1. 8
      src/types.js
  2. 8
      ts_src/types.ts

8
src/types.js

@ -10,7 +10,7 @@ function BIP32Path(value) {
return typeforce.String(value) && !!value.match(/^(m\/)?(\d+'?\/)*\d+'?$/);
}
exports.BIP32Path = BIP32Path;
BIP32Path.toJSON = function () {
BIP32Path.toJSON = () => {
return 'BIP32 derivation path';
};
const SATOSHI_MAX = 21 * 1e14;
@ -34,10 +34,10 @@ exports.Network = typeforce.compile({
exports.Buffer256bit = typeforce.BufferN(32);
exports.Hash160bit = typeforce.BufferN(20);
exports.Hash256bit = typeforce.BufferN(32);
exports.Number = typeforce.Number;
exports.Number = typeforce.Number; // tslint:disable-line variable-name
exports.Array = typeforce.Array;
exports.Boolean = typeforce.Boolean;
exports.String = typeforce.String;
exports.Boolean = typeforce.Boolean; // tslint:disable-line variable-name
exports.String = typeforce.String; // tslint:disable-line variable-name
exports.Buffer = typeforce.Buffer;
exports.Hex = typeforce.Hex;
exports.maybe = typeforce.maybe;

8
ts_src/types.ts

@ -8,7 +8,7 @@ export function UInt31(value: number): boolean {
export function BIP32Path(value: string): boolean {
return typeforce.String(value) && !!value.match(/^(m\/)?(\d+'?\/)*\d+'?$/);
}
BIP32Path.toJSON = function() {
BIP32Path.toJSON = () => {
return 'BIP32 derivation path';
};
@ -35,10 +35,10 @@ export const Network = typeforce.compile({
export const Buffer256bit = typeforce.BufferN(32);
export const Hash160bit = typeforce.BufferN(20);
export const Hash256bit = typeforce.BufferN(32);
export const Number = typeforce.Number;
export const Number = typeforce.Number; // tslint:disable-line variable-name
export const Array = typeforce.Array;
export const Boolean = typeforce.Boolean;
export const String = typeforce.String;
export const Boolean = typeforce.Boolean; // tslint:disable-line variable-name
export const String = typeforce.String; // tslint:disable-line variable-name
export const Buffer = typeforce.Buffer;
export const Hex = typeforce.Hex;
export const maybe = typeforce.maybe;

Loading…
Cancel
Save