From f195666249222c26679c276714b6f466abab5016 Mon Sep 17 00:00:00 2001 From: Chang Wang Date: Fri, 26 Oct 2018 11:55:29 -0400 Subject: [PATCH] add typescript typings --- package.json | 4 +++- typings/index.d.ts | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 typings/index.d.ts diff --git a/package.json b/package.json index 45c463b..241141c 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,13 @@ "licenses": "MIT", "main": "lib/index", "module": "es/index", + "types": "./typings/index.d.ts", "files": [ "dist", "lib", "assets/*.css", - "es" + "es", + "typings/index.d.ts" ], "config": { "port": 8000, diff --git a/typings/index.d.ts b/typings/index.d.ts new file mode 100644 index 0000000..97d2310 --- /dev/null +++ b/typings/index.d.ts @@ -0,0 +1,20 @@ +declare module "rc-progress" { + export interface RCProgressProps { + strokeWidth?: number; + trailWidth?: number; + className?: string; + percent?: number; + strokeColor?: string; + trailColor?: string; + strokeLinecap?: 'butt' | 'square' | 'round'; + prefixCls?: string; + style?: React.CSSProperties; + gapDegree?: number; + gapPosition?: 'top' | 'right' | 'bottom' | 'left'; + } + export class Line extends React.Component { + } + + export class Circle extends React.Component { + } +} \ No newline at end of file