React-markdown: Add type tests, `types/` folder

Created on 16 Oct 2020  路  5Comments  路  Source: remarkjs/react-markdown

Subject of the feature

Types are not checked at all. They鈥檙e in the root.

Problem

Clean, test

鈽傦笍 aretypes 鉀碉笍 statureleased 馃 typenhancement

All 5 comments

ps @ChristianMurphy I think you added in types/unist as a dep, but it isn鈥檛 used I believe

It may or may not be needed.
IIRC I added it because there was a warning/error if it wasn't added.
Checking the types with dtslint and type tests would confirm if it is still needed or not.

Could you take this one on? I haven't dealt with jsx in type tests and am sure what to do about the with-html file in root

There are non-index d.ts files?
That may make moving the typings into a types folder tricky, the rules around non-index files with typings in a different folder than the source file are rather complex.
That's why other unified projects like https://github.com/syntax-tree/unist-util-is have opted to forgo a types folder.

Type tests, I can quickly take on, the only difference with jsx tests is the extension needs to be tsx instead of ts.
Moving the typings out of root into types may take a bit longer to research, setup, and validate (if it is supported at all on the minimum typescript version).

Main thing for me is having 鈥檈m tested; if possible to clean, we can do it later, or in 6

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joelin109 picture joelin109  路  3Comments

garrilla picture garrilla  路  4Comments

dbuchet picture dbuchet  路  3Comments

dekryptic picture dekryptic  路  3Comments

pcvandamcb picture pcvandamcb  路  3Comments