jc-structure 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1,4 +1,7 @@
1
1
  declare module "jc-structure" {
2
+ import type { IStack } from "./types/stack";
3
+ import type { IQueue } from "./types/queue";
4
+ import type { IHeap } from "./types/heap";
2
5
  /**
3
6
  * 栈类,采用object实现
4
7
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jc-structure",
3
3
  "private": false,
4
- "version": "0.1.8",
4
+ "version": "0.1.10",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
package/types/global.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- interface Structure {
1
+ export declare interface Structure {
2
2
  /**
3
3
  * 判断数据结构是否为空
4
4
  */
package/types/heap.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // import type { Structure } from "./global";
2
2
 
3
- interface IHeap<T> extends Structure {
3
+ export declare interface IHeap<T> extends Structure {
4
4
  /**
5
5
  * #### 插入一个值,返回一个布尔值
6
6
  * @param value 要插入的值
package/types/queue.d.ts CHANGED
@@ -1,4 +1,7 @@
1
- declare interface IQueue<T> extends Structure {
1
+ /**
2
+ * #### 队列接口
3
+ */
4
+ export declare interface IQueue<T> extends Structure {
2
5
  /**
3
6
  * #### 移除队列头部元素并返回该元素
4
7
  */
package/types/stack.d.ts CHANGED
@@ -1,8 +1,13 @@
1
- interface StructureObj<T> {
1
+ import type { Structure } from "./global";
2
+
3
+ export interface StructureObj<T> {
2
4
  [key: number]: T;
3
5
  }
4
6
 
5
- declare interface IStack<T> extends Structure {
7
+ /**
8
+ * #### 栈接口
9
+ */
10
+ export declare interface IStack<T> extends Structure {
6
11
  /**
7
12
  * #### 移除栈顶元素并返回该元素
8
13
  */