You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recent reimplementation of @trgwii of ts_loader has been a big improvement, but I think we can do it better. Due to that, I am going to open a new discussion here to talk about it.
Recently I found that ts-node implements skip of type-checking. Maybe we can learn from them and try to implement that in MetaCall. It can be enabled on an optional flag in the global configuration, but we can avoid type checking by default. All if this if avoiding this type-check phase still lets us introspect the type information.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The recent reimplementation of @trgwii of ts_loader has been a big improvement, but I think we can do it better. Due to that, I am going to open a new discussion here to talk about it.
Recently I found that ts-node implements skip of type-checking. Maybe we can learn from them and try to implement that in MetaCall. It can be enabled on an optional flag in the global configuration, but we can avoid type checking by default. All if this if avoiding this type-check phase still lets us introspect the type information.
The
transpileOnly
option implements this feature:https://github.com/TypeStrong/ts-node/blob/bf470684a3a51f3900258d29306bf8227abd715f/src/index.ts#L327
Here is the if that branches depending on the flag:
https://github.com/TypeStrong/ts-node/blob/bf470684a3a51f3900258d29306bf8227abd715f/src/index.ts#L778
And here's the
else
part that is executed whentranspileOnly
is enabled:https://github.com/TypeStrong/ts-node/blob/bf470684a3a51f3900258d29306bf8227abd715f/src/index.ts#L1150
Beta Was this translation helpful? Give feedback.
All reactions