Skip to content

Added type definitions for react-remarkable #7748

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

Merged
merged 6 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Creating and deleting edges is now possible with ctrl+(alt/shift)+leftclick in orthogonal, flight and oblique mode. Also, the flight and oblique modes allow selecting nodes with leftclick, creating new trees with 'c' and deleting the active node with 'del'. [#7678](https://github.com/scalableminds/webknossos/pull/7678)
- Added Typescript defintions for @scalableminds/prop-types package. [#7744](https://github.com/scalableminds/webknossos/pull/7744)
- Time Tracking now also works when editing other users’ shared annotations, and when editing proofreading annotations (a.k.a. editable mappings). [#7749](https://github.com/scalableminds/webknossos/pull/7749)
- Added Typescript definitions for react-remarkable package. [#7748](https://github.com/scalableminds/webknossos/pull/7748)

### Changed
- Improved task list to sort tasks by project date, add option to expand all tasks at once and improve styling. [#7709](https://github.com/scalableminds/webknossos/pull/7709)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Link } from "react-router-dom";
import { PropTypes } from "@scalableminds/prop-types";
import { Table, Tag, Spin, Button, Input, App } from "antd";
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
import Markdown from "react-remarkable";
import * as React from "react";
import _ from "lodash";
Expand Down
1 change: 0 additions & 1 deletion frontend/javascripts/admin/voxelytics/task_view.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from "react";
import { JSONTree } from "react-json-tree";
import { Progress, Tabs, TabsProps, Tooltip } from "antd";
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
import Markdown from "react-remarkable";
import {
VoxelyticsArtifactConfig,
Expand Down
1 change: 0 additions & 1 deletion frontend/javascripts/components/legal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Row, Col, Card } from "antd";
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
import Markdown from "react-remarkable";
import React from "react";
import type { APIOrganization } from "types/api_flow_types";
Expand Down
1 change: 0 additions & 1 deletion frontend/javascripts/components/text_with_description.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Popover, Tooltip } from "antd";
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
import Markdown from "react-remarkable";
import * as React from "react";
import type { EditableTextLabelProp } from "oxalis/view/components/editable_text_label";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
import { Link } from "react-router-dom";
import { PropTypes } from "@scalableminds/prop-types";
import { connect } from "react-redux";
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
import Markdown from "react-remarkable";
import * as React from "react";

Expand Down
1 change: 0 additions & 1 deletion frontend/javascripts/dashboard/publication_card.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Card, Button, Tooltip } from "antd";
import { LinkOutlined } from "@ant-design/icons";
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
import Markdown from "react-remarkable";
import React, { useState } from "react";
import classNames from "classnames";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Input, InputProps, Tooltip } from "antd";
import { CheckOutlined, EditOutlined } from "@ant-design/icons";
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
import Markdown from "react-remarkable";
import * as React from "react";
import { MarkdownModal } from "oxalis/view/components/markdown_modal";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Alert, Modal, Button, Row, Col, Input } from "antd";
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
import Markdown from "react-remarkable";
import * as React from "react";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Modal, Button } from "antd";
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
import Markdown from "react-remarkable";
import * as React from "react";
type Props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type { Dispatch } from "redux";
import { Tooltip, Typography, Tag } from "antd";
import { SettingOutlined, InfoCircleOutlined, EditOutlined } from "@ant-design/icons";
import { connect } from "react-redux";
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
import Markdown from "react-remarkable";
import React, { CSSProperties, ChangeEvent } from "react";
import { Link } from "react-router-dom";
Expand Down
20 changes: 20 additions & 0 deletions frontend/javascripts/types/react-remarkable.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

declare module 'react-remarkable' {
import type React from "react";

type ReactRemarkableProps = {
source?: string,
container?: string,
children?: React.ReactNode,
options?: {
html: boolean,
breaks: boolean
linkify: boolean
}
className?: string
style?: React.CSSProperties
}
declare class Markdown extends React.Component<ReactRemarkableProps> {}
export default Markdown
}