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

Adding Typescript Definitions #429

Merged
merged 2 commits into from
May 5, 2022
Merged

Conversation

rlingineni
Copy link
Contributor

@rlingineni rlingineni commented Nov 4, 2020

Adding Type Definitions and bundling as part of package.json. This should let this pac

#388


  • Stay on point and keep it small so it can be easily reviewed. For example, try to apply any general refactoring separately outside of the PR.
  • Consider adding unit tests, especially for bug fixes. If you don't, tell us why.
  • All new and existing tests pass, with 100% test coverage (npm run test:coverage)
  • Linting passes (npm run lint)
  • Consider updating documentation. If you don't, tell us why.
  • List the environments / platforms in which you tested your changes.

Thanks for contributing to Draftail!

@thibaudcolas thibaudcolas changed the base branch from master to main April 5, 2021 22:30
Copy link
Collaborator

@thibaudcolas thibaudcolas left a 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 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
export interface DrafTailEditorProps {
export interface DraftailEditorProps {

@thibaudcolas thibaudcolas modified the milestones: v1.4.0, v2.0.0 Apr 13, 2021
@thibaudcolas thibaudcolas added the enhancement New feature or request label Apr 13, 2021
Copy link
Collaborator

@thibaudcolas thibaudcolas left a 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.

@thibaudcolas thibaudcolas merged commit bffbb31 into springload:main May 5, 2022
@thibaudcolas thibaudcolas mentioned this pull request Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants