From 035aa3c9dd49af7597dfc38f65ef088763c3c7d5 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 24 Oct 2019 17:52:21 -0400 Subject: [PATCH 1/2] Export ShapeType union --- index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index a89a337..0f7f4c1 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,3 +1,5 @@ +export type ShapeType = 'plus' | 'cross' | 'dash' | 'cross-dash' | 'dot' | 'dot-dash' | 'disc' | 'ring' | 'line' | 'line-vertical' | 'weave' | 'zigzag' | 'zigzag-vertical' | 'diagonal' | 'diagonal-right-left' | 'square' | 'box' | 'triangle' | 'triangle-inverted' | 'diamond' | 'diamond-box'; + /** * Generate a single (HTML5) canvas pattern * @param shapeType pattern shape type @@ -6,7 +8,7 @@ * @param size of pattern "gutter" */ export declare function draw( - shapeType: 'plus' | 'cross' | 'dash' | 'cross-dash' | 'dot' | 'dot-dash' | 'disc' | 'ring' | 'line' | 'line-vertical' | 'weave' | 'zigzag' | 'zigzag-vertical' | 'diagonal' | 'diagonal-right-left' | 'square' | 'box' | 'triangle' | 'triangle-inverted' | 'diamond' | 'diamond-box', + shapeType: ShapeType, /** background color of pattern e.g. '#1f77b4' */ backgroundColor: string, /** color of the pattern e.g. #000000 */ From 8e2247e3e565aca45712bc39da700fcddf3eefc6 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 4 Nov 2019 10:50:04 -0500 Subject: [PATCH 2/2] Add missing zigzag-horizontal --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 0f7f4c1..cc5d582 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1,4 @@ -export type ShapeType = 'plus' | 'cross' | 'dash' | 'cross-dash' | 'dot' | 'dot-dash' | 'disc' | 'ring' | 'line' | 'line-vertical' | 'weave' | 'zigzag' | 'zigzag-vertical' | 'diagonal' | 'diagonal-right-left' | 'square' | 'box' | 'triangle' | 'triangle-inverted' | 'diamond' | 'diamond-box'; +export type ShapeType = 'plus' | 'cross' | 'dash' | 'cross-dash' | 'dot' | 'dot-dash' | 'disc' | 'ring' | 'line' | 'line-vertical' | 'weave' | 'zigzag' | 'zigzag-vertical' | 'zigzag-horizontal' | 'diagonal' | 'diagonal-right-left' | 'square' | 'box' | 'triangle' | 'triangle-inverted' | 'diamond' | 'diamond-box'; /** * Generate a single (HTML5) canvas pattern