rc-progress: Provides its own types (#39501)

This commit is contained in:
Alexander T
2019-11-01 10:42:46 -07:00
committed by Jesse Trinity
parent 5ab0100370
commit dfa5983fc5
6 changed files with 6 additions and 102 deletions
+6
View File
@@ -3360,6 +3360,12 @@
"sourceRepoURL": "https://github.com/stream-utils/raw-body",
"asOfVersion": "2.3.0"
},
{
"libraryName": "rc-progress",
"typingsPackageName": "rc-progress",
"sourceRepoURL": "http://github.com/react-component/progress",
"asOfVersion": "2.4.0"
},
{
"libraryName": "re2",
"typingsPackageName": "re2",
-18
View File
@@ -1,18 +0,0 @@
# Installation
```
npm install --save @types/rc-progress`
```
# Summary
This package contains type definitions for [rc-progress](https://github.com/react-component/progress).
Additional Details
* Last updated: Thu, 15 Nov 2018
* Dependencies: react
* Global values: none
# Credits
These definitions were written by Jussi Kinnula <https://github.com/jussikinnula/>
-42
View File
@@ -1,42 +0,0 @@
// Type definitions for rc-progress 2.2
// Project: http://github.com/react-component/progress
// Definitions by: Jussi Kinnula <https://github.com/jussikinnula>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import * as React from 'react';
export interface CommonProps {
className?: string;
percent?: number | string;
prefixCls?: string;
strokeColor?: string;
strokeLinecap?: 'butt' | 'square' | 'round';
strokeWidth?: number | string;
style?: React.CSSProperties[] | React.CSSProperties;
trailColor?: string;
trailWidth?: number | string;
}
export interface CircleProps extends CommonProps {
gapDegree?: number;
gapPosition?: 'top' | 'bottom' | 'left' | 'right';
}
export class Circle extends React.Component<CircleProps> {
prevTimeStamp?: number;
getPathStyles(): {
pathString: string;
trailPathStyle: React.CSSProperties[] | React.CSSProperties;
strokePathStyle: React.CSSProperties[] | React.CSSProperties;
};
}
export interface LineProps extends CommonProps {
prevTimeStamp?: number;
}
export class Line extends React.Component<LineProps> {
path?: SVGPathElement;
}
-14
View File
@@ -1,14 +0,0 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Line, Circle } from 'rc-progress';
const App = () => (
<div>
<Line percent="10" strokeWidth="4" strokeColor="#D3D3D3" />
<Circle percent="10" strokeWidth="4" strokeColor="#D3D3D3" />
</div>
);
const element = document.createElement('div');
document.body.appendChild(element);
ReactDOM.render(<App />, element);
-25
View File
@@ -1,25 +0,0 @@
{
"files": [
"index.d.ts",
"rc-progress-tests.tsx"
],
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"jsx": "preserve"
}
}
-3
View File
@@ -1,3 +0,0 @@
{
"extends": "dtslint/dt.json"
}