Skip to content
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

MergeObjectProperty is broken under Exact Optional Property Types #1174

Closed
CtrlZvi opened this issue Sep 12, 2021 · 4 comments
Closed

MergeObjectProperty is broken under Exact Optional Property Types #1174

CtrlZvi opened this issue Sep 12, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@CtrlZvi
Copy link

CtrlZvi commented Sep 12, 2021

In which branch or foundry version does the problem occur?
0.8.9

Describe the wrong type
With the new Exact Optional Property Types in Typescript 4.4, the type definition for MergeObjectProperty in helpers.mjs.d.ts is broken. This is because the use of Omit loses the optionality of the members of MergeObjectOptions, causing them to all be required.

To Reproduce
Set compilerOptions.exactOptionalPropertyTypesAdd to true in tsconfig.json and compile anything that uses that type (such as anything extending from ActorSheet).

Expected behavior
The type definitions compile.

Additional context
See microsoft/TypeScript/pull/42524

@CtrlZvi CtrlZvi added the bug Something isn't working label Sep 12, 2021
@kmoschcau
Copy link
Collaborator

This should be closed with #1163

@kmoschcau
Copy link
Collaborator

@CtrlZvi can you check if your problem still occurs with the current foundry-0.8.x branch?

@CtrlZvi
Copy link
Author

CtrlZvi commented Sep 18, 2021

Successful compilation with exactOptionalPropertyTypesAdd set to true and the foundry-0.8.x branch. Thank you!

@ghost91-
Copy link
Collaborator

Closing this then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants