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 type definitions for react-remarkable #7748

Merged
merged 6 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
3 changes: 2 additions & 1 deletion CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released

### Added
- 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)
- Added Typescript definitions for @scalableminds/prop-types package. [#7744](https://github.com/scalableminds/webknossos/pull/7744)
- 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
19 changes: 19 additions & 0 deletions frontend/javascripts/types/react-remarkable.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

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

type ReactRemarkableProps = {
source: string,
container?: string,
hotzenklotz marked this conversation as resolved.
Show resolved Hide resolved
options?: {
html: boolean,
breaks: boolean
linkify: boolean
}
className?: string
style?: React.CSSProperties
}
declare class Markdown extends React.Component<ReactRemarkableProps> {}
export default Markdown
}