x/datastructure@1.2.1/stack/helper.d.ts

Implement different Data Structures using TypeScript. Deno Third-party Module.
Latest
helper.d.ts
// data typeexport type DataType<T> = { key: string|number value: T}
export type StackType = { data: DataType<any> next: null|StackType}|null
// Stack interfaceexport interface StackApi { size: number; getTop(): null|DataType<any> getBottom(): null|DataType<any> push(data: DataType<any>): boolean pop(): boolean|DataType<any> search(key: string|number): boolean|DataType<any> update(key: string|number, newValue: any): boolean|DataType<any> log(): void iterator(): Generator}