Make types compatible with Typescript 4.4#500
Make types compatible with Typescript 4.4#500fcamblor wants to merge 2 commits intoapache:masterfrom
Conversation
Support Typescript 4.4 (apache#500)
|
To maintain backwards compatibility with existing type definitions, we could add the following type aliases to the Other than that, this works well for me. @breautek any chance we might merge this? |
|
As mentioned in my initial post, I'm not sure if putting these declarations into I think we can't do better than providing a specific |
|
@fcamblor yep, that makes sense! I missed that, sorry! Typescript 4.4 was first released a bit over a year ago, so I guess at some point people will be more likely to use 4.4+ and hit this issue. Not really any easy answer, is there 😞 One trivial tweak here if anyone runs into this is to add Seems that "breakages in node_modules and the JS standard libraries which you do not want to deal with" is a literal use case according to https://www.typescriptlang.org/tsconfig#skipLibCheck. I'm having a quick fiddle to see if there's a way to have our cake and eat it though. |
Platforms affected
None, Typescript type definition only
Motivation and Context
Typescript 4.4 has introduced a lot of changes in
lib.dom.d.tsfile, which raises a lot of compilation errors with the plugin.These changes makes it compatible with it.
Description
Entryrenamed toFileSystemEntryFileEntryrenamed toFileSystemFileEntryDirectoryEntryrenamed toFileSystemDirectoryEntryFileSysteminterface which already exists intolib.dom.d.tsTS2687Most of the changes are naming changes to follow Typescript renames.
However, this may require some changes on the application side if :
doc/plugins.mdfile to reflect the naming changes, but I'm unsure of the pertinence of it given that we're going to have discrepancies (in namings) between native code's semantics and javascript's semantic. I can rollback these change if you prefer.index.ts44.d.tsand tell people to reference it instead of the defaultindex.d.tsREADME'sUpgrading notessection to pinpoint these changes (I didn't added any entry as I don't know which version of the plugin may be concerned by this change)Testing
There wasn't any TS-based tests in place currently, didn't spent time to introduce it as I'd consider it as a whole dedicated topic.
Checklist
(platform)if this change only applies to one platform (e.g.(android))