@acagastya/dsts 中文文档教程
DSTS
TL;DR 在 TypeScript 中实现的数据结构。
[toc]
Usage note
假设您想使用 Stack
和 Queue
数据结构。
import { ds } from "dsts";
// or
const { ds } = require("dsts").default;
const { Stack, Queue } = ds;
Folder structure
src
├── adt
│ └── interfaces
├── ds
│ └── data structures
├── extended
│ └── DS with some added functionalities.
└── index.ts ➡️ the file from where everything is imported.
Documentation
Abstract Data Types
NodeItem
类型
— NodeItem | 空 | 未定义
接口
:
value
— type:any
. The value to save in the node.next
— type:NodeType
. Reference to the next node.prev?
— (optional). type:NodeType
. Reference to the previous node.key?
— (optional). type:any
. The key to the value.
Vanilla Data Structures
SingleNode
实现 — NodeItem
属性
value
— (required). type:any
. The value to be saved in the Node.next
— (optional). type:NodeType
. Reference to the next node. (default)null
.
Extended Data Structures
SingleNode
方法
toString
— returnsstring
. Returns string representation of the node'svalue
.
DSTS
TL;DR Data structures implemented in TypeScript.
[toc]
Usage note
Consider you would like to use the Stack
and Queue
data structure.
import { ds } from "dsts";
// or
const { ds } = require("dsts").default;
const { Stack, Queue } = ds;
Folder structure
src
├── adt
│ └── interfaces
├── ds
│ └── data structures
├── extended
│ └── DS with some added functionalities.
└── index.ts ➡️ the file from where everything is imported.
Documentation
Abstract Data Types
NodeItem
type
— NodeItem | null | undefined
interface
:
value
— type:any
. The value to save in the node.next
— type:NodeType
. Reference to the next node.prev?
— (optional). type:NodeType
. Reference to the previous node.key?
— (optional). type:any
. The key to the value.
Vanilla Data Structures
SingleNode
implements — NodeItem
properties
value
— (required). type:any
. The value to be saved in the Node.next
— (optional). type:NodeType
. Reference to the next node. (default)null
.
Extended Data Structures
SingleNode
methods
toString
— returnsstring
. Returns string representation of the node'svalue
.
更多
你可能也喜欢
- 24k-ui-kit-k 中文文档教程
- @1hive/connect-gardens 中文文档教程
- @2players/jet 中文文档教程
- @36node/template-expo 中文文档教程
- @4success/successfactors-cli-tools 中文文档教程
- @666666/messagejs 中文文档教程
- @768bit/vue-sock-rpc 中文文档教程
- @aapokiiso/hsl-congestion-route-pattern-repository 中文文档教程
- @abalmus/validator 中文文档教程
- @abdulghani/combinereducers 中文文档教程