py2ts.data¶
Data structures used in the code generation process.
This module defines the data structures used to represent TypeScript types and interfaces.
Functions
|
Return a string representation of all interfaces and enums in the elements. |
Classes
|
Represents a TypeScript derived type. |
|
Represents a TypeScript array type. |
|
Represents a TypeScript complex type. |
|
Represents a TypeScript enum type. |
|
Represents a TypeScript interface. |
|
Represents a TypeScript interface reference. |
|
Represents a TypeScript literal type. |
|
Represents a TypeScript primitive type. |
|
Represents a TypeScript record type. |
|
Represents a TypeScript tuple type. |
|
Represents a TypeScript union type. |
|
Represents a TypeScript intersection type. |
|
Represents a TypeScript primitive type. |
|
Represents a TypeScript type. |
Module Functions
- py2ts.data.ts_reference_str(elements: Iterable[TypescriptType], ignore=[]) str¶
Return a string representation of all interfaces and enums in the elements.
Resolves nested types and returns a string representation of all interfaces and enums in the elements.
Can be used to create the typescript definitions as strings when generating code.
- Parameters:
elements (Iterable[TypescriptType]) – The elements to be resolved.
ignore (List[TypescriptType], optional) – A list of types to ignore, by default [].
- Returns:
The string representation of all interfaces and enums in the elements.
- Return type: