Skip to content

Commit

Permalink
clear dumb ts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnuttandrew committed Jul 13, 2023
1 parent 7fe4ef8 commit 17eb767
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/prong-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@
"require": "./dist/style.css"
}
}
}
}
3 changes: 2 additions & 1 deletion packages/prong-editor/src/lib/dock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ class Monocle extends Component<MonocleProps, { dragging: boolean }> {
}}
/>
)}
{this.props.children}
{/* @ts-ignore */}
{this.props.children as any}
</div>
</div>,
this.el
Expand Down
2 changes: 1 addition & 1 deletion packages/prong-editor/src/lib/popover-menu/PopoverMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export default function createTooltip(
) {
return (view: EditorView): TooltipView => {
const state = view.state;
let newCache = mapObj(getters, (getter) => getter(view, state));
const newCache = mapObj(getters, (getter) => getter(view, state));
if (cacheEqual(cacheKey, newCache)) {
return toolTipCache as Tooltip;
}
Expand Down
3 changes: 2 additions & 1 deletion sites/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"@types/d3": "^7.4.0",
"@types/friendly-words": "^1.2.0",
"@types/json-schema": "^7.0.12",
"@types/lodash.merge": "^4.6.7",
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"@types/react-syntax-highlighter": "^15.5.7",
Expand All @@ -60,4 +61,4 @@
"vega-datasets": "^2.7.0",
"vite": "^4.4.0"
}
}
}
1 change: 1 addition & 0 deletions sites/docs/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ function Explanation(props: { explanation: string }) {
<div className="explanation-container">
<h3 className="">Example Explanation</h3>
<div style={{ padding: "0 5px", width: "300px" }}>
{/* @ts-ignore */}
<ReactMarkdown>{explanation}</ReactMarkdown>
</div>
</div>
Expand Down
9 changes: 6 additions & 3 deletions sites/docs/src/examples/StyledMarkdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
import { xonokai } from "react-syntax-highlighter/dist/esm/styles/prism";
import ReactMarkdown from "react-markdown";

const MaskedMarkdown = ReactMarkdown as any;
const MaskedHighlight = SyntaxHighlighter as any;
function StyledMarkdown(props: { content: string }) {
// @ts-ignore
return (
<ReactMarkdown
<MaskedMarkdown
components={{
code({ inline, className, children, ...props }) {
return !inline ? (
<SyntaxHighlighter
<MaskedHighlight
{...props}
children={String(children).replace(/\n$/, "")}
style={xonokai}
Expand All @@ -24,7 +27,7 @@ function StyledMarkdown(props: { content: string }) {
}}
>
{props.content}
</ReactMarkdown>
</MaskedMarkdown>
);
}
export default StyledMarkdown;
3 changes: 2 additions & 1 deletion sites/docs/src/examples/TraceryExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ function TraceryCascadeVis(props: {
onClick(node);
}}
>
{node.childRule} {"->"} {<div>{node.finishedText}</div>}
<span>{`${node.childRule}->`}</span>
{<div>{node.finishedText}</div>}
{children.length ? (
<div className="flex">
{children.map((child, idx) => (
Expand Down
4 changes: 2 additions & 2 deletions sites/docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"jsx": "react-jsx",

/* Linting */
"strict": true,
"strict": false,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": false
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
Expand Down
30 changes: 21 additions & 9 deletions sites/docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,18 @@
resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz"
integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==

"@types/lodash.merge@^4.6.7":
version "4.6.7"
resolved "https://registry.yarnpkg.com/@types/lodash.merge/-/lodash.merge-4.6.7.tgz#0af6555dd8bc6568ef73e5e0d820a027362946b1"
integrity sha512-OwxUJ9E50gw3LnAefSHJPHaBLGEKmQBQ7CZe/xflHkyy/wH2zVyEIAKReHvVrrn7zKdF58p16We9kMfh7v0RRQ==
dependencies:
"@types/lodash" "*"

"@types/lodash@*":
version "4.14.195"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.195.tgz#bafc975b252eb6cea78882ce8a7b6bf22a6de632"
integrity sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg==

"@types/mdast@^3.0.0":
version "3.0.12"
resolved "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz"
Expand All @@ -680,7 +692,7 @@

"@types/react-dom@^17.0.11":
version "17.0.20"
resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.20.tgz"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.20.tgz#e0c8901469d732b36d8473b40b679ad899da1b53"
integrity sha512-4pzIjSxDueZZ90F52mU3aPoogkHIoSIDG+oQ+wQK7Cy2B9S+MvOqY0uEA/qawKz381qrEDkvpwyt8Bm31I8sbA==
dependencies:
"@types/react" "^17"
Expand All @@ -693,17 +705,17 @@
"@types/react" "*"

"@types/react@*":
version "18.2.14"
resolved "https://registry.npmjs.org/@types/react/-/react-18.2.14.tgz"
integrity sha512-A0zjq+QN/O0Kpe30hA1GidzyFjatVvrpIvWLxD+xv67Vt91TWWgco9IvrJBkeyHm1trGaFS/FSGqPlhyeZRm0g==
version "17.0.14"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.14.tgz#f0629761ca02945c4e8fea99b8177f4c5c61fb0f"
integrity sha512-0WwKHUbWuQWOce61UexYuWTGuGY/8JvtUe/dtQ6lR4sZ3UiylHotJeWpf3ArP9+DSGUoLY3wbU59VyMrJps5VQ==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
csstype "^3.0.2"

"@types/react@^17", "@types/react@^17.0.38":
version "17.0.62"
resolved "https://registry.npmjs.org/@types/react/-/react-17.0.62.tgz"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.62.tgz#2efe8ddf8533500ec44b1334dd1a97caa2f860e3"
integrity sha512-eANCyz9DG8p/Vdhr0ZKST8JV12PhH2ACCDYlFw6DIO+D+ca+uP4jtEDEpVqXZrh/uZdXQGwk7whJa3ah5DtyLw==
dependencies:
"@types/prop-types" "*"
Expand Down Expand Up @@ -3018,7 +3030,7 @@ react-dnd@^16.0.1:

react-dom@^17.0.2:
version "17.0.2"
resolved "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"
integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==
dependencies:
loose-envify "^1.1.0"
Expand All @@ -3037,7 +3049,7 @@ react-is@^18.0.0:

react-markdown@^8.0.7:
version "8.0.7"
resolved "https://registry.npmjs.org/react-markdown/-/react-markdown-8.0.7.tgz"
resolved "https://registry.yarnpkg.com/react-markdown/-/react-markdown-8.0.7.tgz#c8dbd1b9ba5f1c5e7e5f2a44de465a3caafdf89b"
integrity sha512-bvWbzG4MtOU62XqBx3Xx+zB2raaFFsq4mYiAzfjXJMEz2sixgeAfraA3tvzULF02ZdOMUOKTBFFaZJDDrq+BJQ==
dependencies:
"@types/hast" "^2.0.0"
Expand Down Expand Up @@ -3094,7 +3106,7 @@ react-vega@^7.6.0:

react@^17.0.2:
version "17.0.2"
resolved "https://registry.npmjs.org/react/-/react-17.0.2.tgz"
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
dependencies:
loose-envify "^1.1.0"
Expand Down Expand Up @@ -3224,7 +3236,7 @@ [email protected]:

scheduler@^0.20.2:
version "0.20.2"
resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
dependencies:
loose-envify "^1.1.0"
Expand Down

0 comments on commit 17eb767

Please sign in to comment.