Skip to content

Commit

Permalink
#5497 – Refactor (Connection.ts): Specify the types (amend)
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriiP-EPAM committed Sep 12, 2024
1 parent b7a4ae8 commit f7ee479
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { PolymerBond } from 'domain/entities/PolymerBond';
import { SubChainNode } from 'domain/entities';

type DirectionInDegrees = 0 | 90 | 180 | 270;
type DirectionOfLastCell = { readonly x: number; readonly y: number };

export class Connection {
constructor(
public readonly connectedNode: SubChainNode | null,
public readonly direction: 0 | 90 | 180 | 270 | { x: number; y: number },
public readonly direction: DirectionInDegrees | DirectionOfLastCell,
public readonly isVertical: boolean,
public readonly polymerBond: PolymerBond,
public xOffset: number,
Expand Down

0 comments on commit f7ee479

Please sign in to comment.