At the moment Typescript doesn't have a LIST<T> collection. This library helps developers to use LIST<T> collection in their application.
0.1 Beta
- Any text editor, preferablly Visual Studio Code
- Add, remove values to the list
- Retrieve the value of a given index
- Find the size of the List
- Retrieve all the values of the list as an array
- Ability to define the type of the list
- Download the list.ts file from this repositary
- Add it to your project
- Link the file to the project. (In Aangular export keyword has to be used in front of the class keyword in the file)
- Typescript
- Javascript
MIT
Badde Liyanage Don Dilanga, 2020/October, github@dilanga.com. Sri Lanka LK.
public List<T>() = Initialize a new instance of List class with T type.
- public add(value: T) = Add a T type value to the instance
- public remove(index: number): T[] = Remove the value at the given index from the instance, and retrieve the filtered instance (A copy of the original instance).
- public index(index: number): T = Retrieve the value at the given index
- public get size(): number = Retrieve the length of the instance
- public get values(): Array<T> = Retrieve the instance itself.