We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e68806c commit ac87ff9Copy full SHA for ac87ff9
src/py2ts/generate.py
@@ -190,7 +190,7 @@ def _basic_to_ts(py_type: Type | UnionType) -> TypescriptType:
190
191
if origin in _wrapper_types():
192
# If the type is just a wrapper type (e.g. sqlalchemy Mapped)
193
- return _basic_to_ts(get_args(py_type)[0])
+ return _generate_ts(get_args(py_type)[0])
194
195
# Not Required
196
if origin is NotRequired:
tests/test_record.py
@@ -25,6 +25,14 @@
25
),
26
"Record<string, number>",
27
28
+ (
29
+ dict[str, str],
30
+ TSRecordType(
31
+ TSPrimitiveType(TypescriptPrimitive.STRING),
32
33
+ ),
34
+ "Record<string, string>",
35
36
(
37
Dict,
38
TSRecordType(
0 commit comments