Class TypeScriptGenerationOptions
- Namespace
- TypedRest.CodeGeneration.TypeScript
- Assembly
- TypedRest.CodeGeneration.TypeScript.dll
Options controlling the generation of a TypeScript TypedRest client.
public class TypeScriptGenerationOptions : ClientGenerationOptions
- Inheritance
-
objectTypeScriptGenerationOptions
- Inherited Members
Constructors
TypeScriptGenerationOptions(string)
Creates new generation options.
public TypeScriptGenerationOptions(string serviceName)
Parameters
serviceNamestringThe service name to use for the entry endpoint.
TypeScriptGenerationOptions(ClientGenerationOptions)
Creates new generation options, copying the common options from other.
public TypeScriptGenerationOptions(ClientGenerationOptions other)
Parameters
otherClientGenerationOptions
Fields
DefaultDtoDirectory
The default directory DTO modules are written to, relative to the output directory.
public const string DefaultDtoDirectory = "dtos"
Field Value
Properties
GenerateIndex
Controls whether to generate an index.ts re-exporting every generated module.
public bool GenerateIndex { get; set; }
Property Value
TypedRestPackage
The name of the npm package providing TypedRest.
public string TypedRestPackage { get; set; }
Property Value
UntypedFallback
The type to use for schemas that carry no usable type information. Defaults to unknown.
public TsIdentifier UntypedFallback { get; set; }
Property Value
Methods
Modules()
The modules of the TypedRest runtime library to import from.
public Modules Modules()
Returns
NamingStrategy()
Builds a NamingStrategy applying the directory fallbacks.
public NamingStrategy NamingStrategy()
Returns
Remarks
Unlike the C# generator, DTOs default to their own subdirectory rather than to the endpoint namespace, because every generated type gets a file of its own.