ci: add a tslint rule to require type definitions
This commit is contained in:
parent
74375bfedf
commit
0cdd7b1e2c
21 changed files with 36 additions and 30 deletions
|
@ -2,12 +2,12 @@ export function prop(object: {}, name: string, f: () => any): void {
|
|||
Object.defineProperty(object, name, {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
get() {
|
||||
get(): any {
|
||||
const _value = f.call(this);
|
||||
this[name] = _value;
|
||||
return _value;
|
||||
},
|
||||
set(_value) {
|
||||
set(_value: any): void {
|
||||
Object.defineProperty(this, name, {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
|
|
|
@ -28,7 +28,7 @@ export function p2ms(a: Payment, opts?: PaymentOpts): Payment {
|
|||
throw new TypeError('Not enough data');
|
||||
opts = Object.assign({ validate: true }, opts || {});
|
||||
|
||||
function isAcceptableSignature(x: Buffer | number) {
|
||||
function isAcceptableSignature(x: Buffer | number): boolean {
|
||||
return (
|
||||
bscript.isCanonicalScriptSignature(x as Buffer) ||
|
||||
(opts!.allowIncomplete && (x as number) === OPS.OP_0) !== undefined
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue