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

Generate types for unreachable definitions #372

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

relu91
Copy link
Member

@relu91 relu91 commented Jan 27, 2022

w3c/wot-thing-description#1319 introduced a schema definition for Form. In principle, this new definition was added to let typescript users have a type for a generic form. Sadly, json-schema-to-typescript does not automatically do it but you have to enable it. This PR enables the generation of unreachable definitions. As you can see on the diff enabling such option causes also the generation of a long list of unwanted comments. I tried to get rid of them without any success. I'm waiting for an answer from the main contributors to remove them, meanwhile, I think we can live with them.

@danielpeintner
Copy link
Contributor

Mhh, sad.... maybe we can do some command afterwards to remove those lines all together.

Anyhow, for the time being I am fine with it. Maybe it gets fixed soon.

@relu91
Copy link
Member Author

relu91 commented Jan 27, 2022

Another try could be to write down a description of each rule, that should substitute the awful comment... but there are many rules 🤣

@danielpeintner
Copy link
Contributor

danielpeintner commented Jan 28, 2022

Another try could be to write down a description of each rule, that should substitute the awful comment... but there are many rules 🤣

I don't think it is reasonable. Hence I would go ahead

  1. Use as is and hope it gets fixed soon
  2. In the worst case a simple search&replace script could do the job since it is always the same text.

@danielpeintner
Copy link
Contributor

danielpeintner commented Jan 31, 2022

Scripting API 2022-01-31

@relu91
Copy link
Member Author

relu91 commented Feb 3, 2022

@danielpeintner ready to go

@danielpeintner danielpeintner merged commit f0f3d0e into w3c:main Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants