Skip to content

Commit

Permalink
refactor(csp): update delete op (TS4.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Aug 28, 2020
1 parent 9c33410 commit 5482bf4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions packages/csp/src/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,13 +553,13 @@ export class Channel<T> implements IReadWriteableChannel<T> {
this.state = State.DONE;
this.flush();
this.buf.release();
delete this.reads;
delete this.writes;
delete this.buf;
delete this.txbuf;
delete this.tx;
delete this.isBusy;
delete this.onerror;
delete (<any>this).reads;
delete (<any>this).writes;
delete (<any>this).buf;
delete (<any>this).txbuf;
delete (<any>this).tx;
delete (<any>this).isBusy;
delete (<any>this).onerror;
}
}

Expand Down
6 changes: 3 additions & 3 deletions packages/csp/src/mult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ export class Mult<T> implements IWriteableChannel<T> {
for (let t of this.taps) {
await t.close();
}
delete this.src;
delete this.taps;
delete this.tapID;
delete (<any>this).src;
delete (<any>this).taps;
delete (<any>this).tapID;
}
}
6 changes: 3 additions & 3 deletions packages/csp/src/pubsub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ export class PubSub<T> implements IWriteableChannel<T> {
for (let id of Object.keys(this.topics)) {
this.topics[id].close();
}
delete this.src;
delete this.topics;
delete this.fn;
delete (<any>this).src;
delete (<any>this).topics;
delete (<any>this).fn;
}
}
2 changes: 1 addition & 1 deletion packages/dcons/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class DCons<T>
next;
while (cell) {
next = cell.next;
delete cell.value;
delete (<any>cell).value;
delete cell.prev;
delete cell.next;
cell = next;
Expand Down

0 comments on commit 5482bf4

Please sign in to comment.