Skip to content
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

Merged
merged 3 commits into from
May 7, 2018
Merged

Conversation

9renpoto
Copy link
Contributor

@9renpoto 9renpoto commented May 2, 2018

Closes #380

@codecov-io
Copy link

codecov-io commented May 2, 2018

Codecov Report

Merging #381 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a3b7d50...7aad378. Read the comment docs.

export interface Props {
prefixCls?: string;
className?: string;
style?: object;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

React.CSSProperties

style?: object;
defaultValue?: Moment;
value?: Moment;
selectedValue?: object;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moment

onOk?: () => void;
onKeyDown?: () => void;
timePicker?: React.ReactNode;
dateInputPlaceholder?: any;
Copy link
Member

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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two whitespace indent.

@@ -0,0 +1,23 @@
{
"compilerOptions": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two whitespace indent.

@@ -0,0 +1,38 @@
// Type definitions for rc-calendar 9.6
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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.

@yesmeck
Copy link
Member

yesmeck commented May 2, 2018

Need to add the .d.ts file to the files field of package.json.

@9renpoto
Copy link
Contributor Author

9renpoto commented May 3, 2018

Fixed 👍

@yesmeck yesmeck merged commit 98615a0 into react-component:master May 7, 2018
@9renpoto
Copy link
Contributor Author

9renpoto commented May 7, 2018

Thanks !

@9renpoto 9renpoto deleted the feature/types branch May 7, 2018 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants