Skip to content

Commit 8265289

Browse files
committed
refactor: - Make some more arrays of Link readonly
1 parent a339554 commit 8265289

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Scripting/TasksFile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class TasksFile {
6363
/**
6464
* Return an array of {@link Link} all the links in the file - both in frontmatter and in the file body.
6565
*/
66-
get outlinks(): Link[] {
66+
get outlinks(): Readonly<Link[]> {
6767
return [...this.outlinksInProperties, ...this.outlinksInBody];
6868
}
6969

src/Task/ListItem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export class ListItem {
208208
/**
209209
* Return a list of links in the task or list item's line.
210210
*/
211-
public get outlinks(): Link[] {
211+
public get outlinks(): Readonly<Link[]> {
212212
return this.rawLinksInFileBody
213213
.filter((link) => link.position.start.line === this.lineNumber)
214214
.map((link) => LinkResolver.getInstance().resolve(link, this.file.path));

0 commit comments

Comments
 (0)