-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
Consider the following simple model:
from pydantic import BaseModel
class Sprite(BaseModel):
path: str | None
crop: tuple[int, int, int, int]
hotspot: tuple[int, int]
Running uvx --from 'pydantic-to-typescript>=2' pydantic2ts --module test.py --output test.ts
produces
/* tslint:disable */
/* eslint-disable */
/**
/* This file was automatically generated from pydantic models by running pydantic2ts.
/* Do not modify it by hand - just update the pydantic models and then re-run the script
*/
export interface Sprite {
path: string | null;
/**
* @minItems 4
* @maxItems 4
*/
crop: [unknown, unknown, unknown, unknown];
/**
* @minItems 2
* @maxItems 2
*/
hotspot: [unknown, unknown];
}
The expected behaviour is that the tuples are encoded as e.g. [number, number, number, number]
.
Metadata
Metadata
Assignees
Labels
No labels