-
Notifications
You must be signed in to change notification settings - Fork 761
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
Make types compatible with Typescript 4.4 #500
base: master
Are you sure you want to change the base?
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.ts
file, which raises a lot of compilation errors with the plugin.These changes makes it compatible with it.
Description
Entry
renamed toFileSystemEntry
FileEntry
renamed toFileSystemFileEntry
DirectoryEntry
renamed toFileSystemDirectoryEntry
FileSystem
interface which already exists intolib.dom.d.ts
TS2687
Most of the changes are naming changes to follow Typescript renames.
However, this may require some changes on the application side if :
doc/plugins.md
file 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.ts
and tell people to reference it instead of the defaultindex.d.ts
README
'sUpgrading notes
section 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)
)