-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added TypesScript support #381
Conversation
Codecov Report
@@ Coverage Diff @@
## master #381 +/- ##
======================================
Coverage 88.5% 88.5%
======================================
Files 9 9
Lines 600 600
Branches 158 158
======================================
Hits 531 531
Misses 58 58
Partials 11 11 Continue to review full report at Codecov.
|
types/rc-calendar/index.d.ts
Outdated
export interface Props { | ||
prefixCls?: string; | ||
className?: string; | ||
style?: object; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
React.CSSProperties
types/rc-calendar/index.d.ts
Outdated
style?: object; | ||
defaultValue?: Moment; | ||
value?: Moment; | ||
selectedValue?: object; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moment
types/rc-calendar/index.d.ts
Outdated
onOk?: () => void; | ||
onKeyDown?: () => void; | ||
timePicker?: React.ReactNode; | ||
dateInputPlaceholder?: any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string
?
import Calendar from 'rc-calendar'; | ||
|
||
const action = (date: moment.Moment) => { | ||
date.subtract(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two whitespace indent.
types/rc-calendar/tsconfig.json
Outdated
@@ -0,0 +1,23 @@ | |||
{ | |||
"compilerOptions": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two whitespace indent.
types/rc-calendar/index.d.ts
Outdated
@@ -0,0 +1,38 @@ | |||
// Type definitions for rc-calendar 9.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to put this file under the root of the project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yesmeck Thank you review 👍
renamed: types/rc-calendar/index.d.ts -> index.d.ts
renamed: types/rc-calendar/rc-calendar-tests.tsx -> rc-calendar-tests.tsx
renamed: types/rc-calendar/tsconfig.json -> tsconfig.json
renamed: types/rc-calendar/tslint.json -> tslint.json
Do I need to move the file as follows?
If that's okay add the path to package.json files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please just put these files under the root of the project.
Need to add the |
Fixed 👍 |
Thanks ! |
Closes #380