Re:Adopting Ruby 3 types with RBS
by throwaway189262 on Saturday December 26, 2020 @05:18AM
(#25542514)
Those are only used to retrofit types on external libraries that don't have them. All types within project are in the source.
.d.ts is a way to add types to source you don't control.
Ruby should have gone the path of typescript where .d.ts generation and type stripping is done by a tool you run when you publish your library. That way you can work with types in your code but export it to plain js that others can use with or without tyoings
.d.ts is a way to add types to source you don't control.
Ruby should have gone the path of typescript where .d.ts generation and type stripping is done by a tool you run when you publish your library. That way you can work with types in your code but export it to plain js that others can use with or without tyoings