From 7e090f393f5b822ea62d452dd049b9f4baa933fd Mon Sep 17 00:00:00 2001 From: Lars Melchior Date: Wed, 17 Jul 2024 20:41:24 +0200 Subject: [PATCH] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0c5d9d9..f8c3a06 100644 --- a/README.md +++ b/README.md @@ -92,12 +92,13 @@ TypeScript2Python supports many of TypeScripts type constructs, including: - Optional properties `{ optional?: number }`, that get transpiled to `NotRequired[...]` attributes - Docstrings `/** this is very useful */` -## Transpilation options +## Transpiler options ### Nullable optionals In TypeScript objects, optional values can also be set to `undefined`. By default we assume the according Python -type to be non-nullable, but a more closely matching behavior can be achieved using the flag `--nullable-optionals`. +type to be non-nullable, but a more closely matching behavior can be achieved using the flag `--nullable-optionals`. +This will result in optional entries beeing transpiled as `NotRequired[Optional[T]]` instead of `NotRequired[T]`. ## Limitations