-
Notifications
You must be signed in to change notification settings - Fork 64
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
Adding Typescript Definitions #429
Conversation
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.
Thank you @rlingineni, I think this is a good idea, however in its current state this is neither complete nor accurate so it would do more harm than good. Personally I would understand third-party type definitions being inaccurate, but if they come with the package then I expect them to be 100% correct.
This is missing:
- Icon
- ToolbarButton
- DraftUtils
- createEditorStateFromRaw
- serialiseEditorStateToRaw
And for inaccuracies – just going from what I’ve seen so far:
- All the configuration arrays for formatting options definitely aren’t of
any
type. - Toolbar isn’t a type obviously.
- DraftailEditor isn’t a PureComponent
import { EditorState, RawDraftContentState } from 'draft-js'; | ||
import * as React from 'react'; | ||
|
||
export interface DrafTailEditorProps { |
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.
export interface DrafTailEditorProps { | |
export interface DraftailEditorProps { |
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.
Thank you @rlingineni :) This isn’t completely ready to publish but I think it’s a great first step so I’ll merge this now.
Adding Type Definitions and bundling as part of package.json. This should let this pac
#388
npm run test:coverage
)npm run lint
)Thanks for contributing to Draftail!