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
It would be extremely convenient to have in the configuration a place to add a list of import that are injected at the top of the generated .d.ts file.
Issue
Currently, using the sql-ts configuration file, a developer can define a typeMap. However, if the mapping point into a custom type, it gets converted to any.
The desired result is to have at the top of the generated d.ts file imports for custom type. In that case:
import {DateOnly} from "./............"
This way, the DateOnly would point to number instead of any.
Similar Past Issue
This issue from few years ago was raised. A follow up comment talked about using template but I couldn't see any clear documentation about how to add an import.
The text was updated successfully, but these errors were encountered:
Description
It would be extremely convenient to have in the configuration a place to add a list of import that are injected at the top of the generated
.d.ts
file.Issue
Currently, using the sql-ts configuration file, a developer can define a
typeMap
. However, if the mapping point into a custom type, it gets converted toany
.For example:
In that case, the
DateOnly
is a very basic type that is anumber
but it is a descriptive way used in the system.Potential Solutions
Similar to how The Guild CodeGen for GraphQL is having its configurations, to have a way to map the type into another one (or file).
In the configuration json file a new entry like:
Desired Result
The desired result is to have at the top of the generated d.ts file imports for custom type. In that case:
This way, the
DateOnly
would point tonumber
instead ofany
.Similar Past Issue
This issue from few years ago was raised. A follow up comment talked about using template but I couldn't see any clear documentation about how to add an import.
The text was updated successfully, but these errors were encountered: