luxtagofficial / Apostille-library

The official Apostille Typescript repository

Home Page:https://apostille.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change properties of Apostille to protected from private

jontey opened this issue · comments

We are having issues with accessing private variables from Apostille class when we extend the class.

Suggest changing private properties to protected to enable child classes to access the variables.

http://www.typescriptlang.org/docs/handbook/classes.html#understanding-protected

you mean all private properties or few?

This one in particular

[line 32]
private transactions: IReadyTransaction[] = [];

It's highly not likely that you want to access the transactions as they are chronologically created and should not be tampered with, however for test purposes you can do this trick:

// tslint:disable-next-line:no-string-literal
expect(privateApostille['transactions'][0].type).toEqual(TransactionType.TRANSFER);