Skip to content

Update README.md #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ This project implements a transpiler for creating [pyright](https://github.com/m
This is useful in a number of scenarios.
For example:

- Automatic generation of type-safe APIs between Node.js and Python services
- Safely use JSON objects created by TypeScript projects in Python
- A nice way to write complex Python types using TypeScript
- Automatic generation of type-safe APIs between Node.js and Python applications
- An easy way to write complex Python typings using TypeScript

## Example

### TypeScript

```ts
export type Foo = {
type: "foo"
Expand Down Expand Up @@ -102,8 +103,8 @@ This will result in optional entries beeing transpiled as `NotRequired[Optional[

## Limitations

We currently do not support the following features:
The main focus of this project is transpiling type definitions for serializable data (e.g. JSON objects), and the following is not planned to be supported:

- Generics, as they cannot be fully supported by Python
- Function signatures, as we restrict ourselves top serializable data
- Values, as this is an extremely difficult problem and we currently only attempt to transpile types
- Generics, as TypeScript's type system is much more powerful than Python's
- Function signatures, as we restrict ourselves to serializable data
- Anything that isn't a type definition