Skip to content

Commit

Permalink
Merge pull request #51 from Sunday9787/types
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcc authored Dec 18, 2018
2 parents 40d89d1 + 6fcedd9 commit 75666f1
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
declare module 'canvas-nest.js' {
interface configType {
/**
* 线条颜色, 默认: '0,0,0' ;三个数字分别为(R,G,B),注意用,分割
*/
color?: string;

/**
* 线条的总数量, 默认: 150
*/
count?: number;

/**
* 背景的z-index属性,css属性用于控制所在层的位置, 默认: -1
*/
zIndex?: number;

/**
* 线条透明度(0~1), 默认: 0.5
*/
opacity?: number;
}

class CanvasNest {
constructor(element: Element, config?: configType)
destroy(): void;
}

export default CanvasNest;
}

0 comments on commit 75666f1

Please sign in to comment.