Skip to content

Commit

Permalink
Run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
lhstrh committed Jul 4, 2023
1 parent 57c7b79 commit e3e10c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/core/port.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ export abstract class WritableMultiPort<T> implements MultiReadWrite<T> {
*/
interface IOPortManager<T> extends TriggerManager {
// See https://github.com/lf-lang/reactor-ts/issues/184
// eslint-disable-next-line @typescript-eslint/method-signature-style
// eslint-disable-next-line @typescript-eslint/method-signature-style
addReceiver(port: WritablePort<T>): void;
// eslint-disable-next-line @typescript-eslint/method-signature-style
// eslint-disable-next-line @typescript-eslint/method-signature-style
delReceiver(port: WritablePort<T>): void;
}

Expand Down
13 changes: 7 additions & 6 deletions src/core/reactor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,9 @@ export abstract class Reactor extends Component {
this._dependencyGraph.addEdge(src, dst);
// Register receiver for value propagation.
const writer = dst.asWritable(this._getKey(dst));
src.getManager(this._getKey(src)).addReceiver(writer as unknown as WritablePort<S>);
src
.getManager(this._getKey(src))
.addReceiver(writer as unknown as WritablePort<S>);
const val = src.get();
if (this._runtime.isRunning() && val !== undefined) {
writer.set(val);
Expand Down Expand Up @@ -1322,7 +1324,8 @@ export abstract class Reactor extends Component {

protected _connectCall<A extends T, R, T, S extends R>(
src: CallerPort<A, R>,
dst: CalleePort<T, S>): void {
dst: CalleePort<T, S>
): void {
if (this.canConnectCall(src, dst)) {
Log.debug(this, () => `connecting ${src} and ${dst}`);
// Treat connections between callers and callees separately.
Expand Down Expand Up @@ -1455,7 +1458,7 @@ export abstract class Reactor extends Component {
* @param src Source port of connection to be disconnected.
* @param dst Destination port of connection to be disconnected. If undefined, disconnect all connections from the source port.
*/
protected _disconnect<R, S extends R>(src: IOPort<S>, dst?: IOPort<R>): void {
protected _disconnect<R, S extends R>(src: IOPort<S>, dst?: IOPort<R>): void {
if (
(!this._runtime.isRunning() && this._isInScope(src, dst)) ||
this._runtime.isRunning()
Expand All @@ -1480,9 +1483,7 @@ export abstract class Reactor extends Component {
for (const node of nodes) {
if (node instanceof IOPort) {
const writer = node.asWritable(this._getKey(node));
src
.getManager(this._getKey(src))
.delReceiver(writer);
src.getManager(this._getKey(src)).delReceiver(writer);
this._dependencyGraph.removeEdge(src, node);
}
}
Expand Down

0 comments on commit e3e10c2

Please sign in to comment.