Typescript generation #441
Replies: 3 comments
-
Hi @CrosRoad95, ClearScript does not generate TypeScript declarations for .NET resources. Sorry! |
Beta Was this translation helpful? Give feedback.
-
yes i already figure it out, just need some tip how to do this? as i said i want to get all types added to js runtime but from what i see clearscript add more types than i declared |
Beta Was this translation helpful? Give feedback.
-
Sorry, this isn't something we've ever investigated, so we have no tips for you. In theory, since all .NET type information is accessible via reflection, it should be possible to generate TypeScript declarations automatically. However, capturing the entirety of ClearScript's .NET interop via TypeScript declarations – given all the ways in which you can customize that behavior – would be a large project. In fact, since you can customize ClearScript's behavior at runtime – e.g., by changing the default script access level or installing a new custom attribute loader – it may not actually be possible to do it all via static TypeScript declarations.
Please say more about this. ClearScript should not be exposing anything without your permission. The only exception is the |
Beta Was this translation helpful? Give feedback.
-
Title self explain :) i would like to generate typescript definitions, any suggestions how to do this better? right now i manually specify what classes i would like to use to generate types.
approach i think is the best is to hook clearscript
addhost*
functions and based on that generate typesBeta Was this translation helpful? Give feedback.
All reactions