Prosemirror: [feature request]Need Official Typescript support

Created on 16 Jul 2019  路  2Comments  路  Source: ProseMirror/prosemirror

Issue details

Maybe we need to do something for the trend of Typescript. Now most of my code is written using typescript, But the prosemirror's types support is not complete.

Most helpful comment

I don't know if you heard about it but with the latest version of TypeScript (3.7), the --declaration and --allowJs flags can be used together (https://github.com/microsoft/TypeScript/issues/7546). It means that typings can be directly generated from JS code. It might help in your case?

Moreover, a JS codebase can be progressively moved to a TypeScript one, i.e. some files can be first transformed into TypeScript ones, then some other later, and so on...

All 2 comments

I'm sympathetic to that, and eventually it'd be nice to port ProseMirror to TypeScript entirely. (It started as typed code, but at the time neither Flow nor TypeScript were mature enough to warrant the extra friction鈥攂ut by now TypeScript has come a long way, and using it in CodeMirror 6 has been a great experience.)

However, I don't see myself having time to do this in the near future, and it'd involve finnicky stuff like porting over our documentation generation to another approach.

So for now, I recommend continuing to submit fixes to the types provided by definitelytyped when you notice problems.

I don't know if you heard about it but with the latest version of TypeScript (3.7), the --declaration and --allowJs flags can be used together (https://github.com/microsoft/TypeScript/issues/7546). It means that typings can be directly generated from JS code. It might help in your case?

Moreover, a JS codebase can be progressively moved to a TypeScript one, i.e. some files can be first transformed into TypeScript ones, then some other later, and so on...

Was this page helpful?
0 / 5 - 0 ratings