TS
Getting started with ADSJS in TypeScript.
This guide explains how to use ADSJS in projects with TS support.
To add ADSJS into your project run the following command in terminal (from project directory):
npm install ads-js
Then give it a try in your source code:
import { SinglyLinkedList } from 'ads-js';
// or
import { SinglyLinkedList } from 'ads-js/lists';
const list = new SinglyLinkedList([1, 2, 3]);
const position = list.getLast();
console.log(position.element);
Importing from 'ads-js'
may be redundant in case you tend to use limited functional of the ADSJS in your project. To reduce your build size consider importing from specific aliases instead, like 'ads-js/lists'
.
Visit PUBLIC API section to get further details about capabilities of this library.
Last updated
Was this helpful?