Skip to content

Commit

Permalink
clonePortRecord & clonePortEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Aug 16, 2023
1 parent 99bc79d commit a562798
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 0 additions & 4 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# connected component

`clonePortRecord`

`clonePortEntry`

`copyNode`

`Net` should not have `edges`
Expand Down
5 changes: 5 additions & 0 deletions src/lang/net/clonePortEntry.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { PortEntry } from "./Net"

export function clonePortEntry(entry: PortEntry): PortEntry {
return { ...entry }
}
5 changes: 5 additions & 0 deletions src/lang/net/clonePortRecord.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { PortRecord } from "./Net"

export function clonePortRecord(record: PortRecord): PortRecord {
return { ...record }
}
2 changes: 1 addition & 1 deletion src/lang/net/copyNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import { findPortRecordOrFail } from "./findPortRecordOrFail"

export function copyNode(source: Net, target: Net, node: Node): void {
const portRecord = findPortRecordOrFail(source, node)
//
// clonePortRecord(portRecord)
}

0 comments on commit a562798

Please sign in to comment.