Created
October 18, 2021 05:01
-
-
Save n8rzz/ec92e19eb20ecd0b44ea84d37fd4ff37 to your computer and use it in GitHub Desktop.
Student.collection.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { StudentModel } from "./Student.model"; | |
export class StudentCollection { | |
private _items: StudentModel[] = []; | |
get length(): number { | |
return this._items.length; | |
} | |
public addItems(itemsToAdd: StudentModel[]): void { | |
itemsToAdd.forEach((item: StudentModel) => { | |
this._items.push(item); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment