Add HACK comments

This commit is contained in:
Leonid Logvinov 2018-06-29 15:30:10 +03:00
parent f7b3fc58bc
commit bcc588efe7
No known key found for this signature in database
GPG Key ID: 0DD294BFDE8C95D4
4 changed files with 8 additions and 0 deletions

View File

@ -49,6 +49,8 @@ export class ERC20ProxyWrapper extends ContractWrapper {
const contractAddress = this._getContractAddress(artifacts.ERC20Proxy, this._contractAddressIfExists);
return contractAddress;
}
// HACK: We don't want this method to be visible to the other units within that package but not to the end user.
// TS doesn't give that possibility and therefore we make it private and access it over an any cast. Because of that tslint sees it as unused.
// tslint:disable-next-line:no-unused-variable
private _invalidateContractInstance(): void {
delete this._erc20ProxyContractIfExists;

View File

@ -406,6 +406,8 @@ export class ERC20TokenWrapper extends ContractWrapper {
);
return logs;
}
// HACK: We don't want this method to be visible to the other units within that package but not to the end user.
// TS doesn't give that possibility and therefore we make it private and access it over an any cast. Because of that tslint sees it as unused.
// tslint:disable-next-line:no-unused-variable
private _invalidateContractInstances(): void {
this.unsubscribeAll();

View File

@ -49,6 +49,8 @@ export class ERC721ProxyWrapper extends ContractWrapper {
const contractAddress = this._getContractAddress(artifacts.ERC721Proxy, this._contractAddressIfExists);
return contractAddress;
}
// HACK: We don't want this method to be visible to the other units within that package but not to the end user.
// TS doesn't give that possibility and therefore we make it private and access it over an any cast. Because of that tslint sees it as unused.
// tslint:disable-next-line:no-unused-variable
private _invalidateContractInstance(): void {
delete this._erc721ProxyContractIfExists;

View File

@ -442,6 +442,8 @@ export class ERC721TokenWrapper extends ContractWrapper {
);
return logs;
}
// HACK: We don't want this method to be visible to the other units within that package but not to the end user.
// TS doesn't give that possibility and therefore we make it private and access it over an any cast. Because of that tslint sees it as unused.
// tslint:disable-next-line:no-unused-variable
private _invalidateContractInstances(): void {
this.unsubscribeAll();