TypeScriptFluent class
Represents a wrapper around TsModelBuilder and TsGenerator that simplify usage a enables fluent configuration.
Namespace: TypeLite
Properties
| Name | Description | |
|---|---|---|
| ModelBuilder | Gets the ModelBuilder being configured with fluent configuration. |
Methods
| Name | Description | |
|---|---|---|
| For | Adds specific class with all referenced classes to the model. | |
| For | Adds all classes annotated with the TsClassAttribute from an assembly to the model. | |
| For<T> | Adds specific class with all referenced classes to the model. | |
| Generate | Generates TypeScript definitions for types included in this model builder. Optionally restricts output to classes or enums. | |
| Generate | Generates TypeScript definitions for types included in this model builder. | |
| WithConvertor<TFor> | Registers a converter for the specific type | |
| WithFormatter | Registers a formatter for member identifiers | |
| WithFormatter | Registers a formatter for member types | |
| WithFormatter | Registers a formatter for module names | |
| WithFormatter | Registers a formatter for the the TsClass type. | |
| WithFormatter<TFor> | Registers a formatter for the specific type | |
| WithIndentation | Sets a string for single indentation level in the output | |
| WithReference | Registers a typescript reference file | |
| WithVisibility | Registers a formatter for type visibility |
TypeScriptFluent.ModelBuilder property
Gets the ModelBuilder being configured with fluent configuration.
Syntax
TypeScriptFluent.For method
Adds specific class with all referenced classes to the model.
Syntax
Parameters
-
Typetype - The type to add to the model.
Returns
-
TypeScriptFluentModuleMember - Instance of the TypeScriptFluent that enables fluent configuration.
TypeScriptFluent.For method
Adds all classes annotated with the TsClassAttribute from an assembly to the model.
Syntax
Parameters
-
Assemblyassembly - The assembly with classes to add.
Returns
-
TypeScriptFluent - Instance of the TypeScriptFluent that enables fluent configuration.
TypeScriptFluent.For<T> method
Adds specific class with all referenced classes to the model.
Syntax
Returns
-
TypeScriptFluentModuleMember - Instance of the TypeScriptFluent that enables fluent configuration.
TypeScriptFluent.Generate method
Generates TypeScript definitions for types included in this model builder. Optionally restricts output to classes or enums.
Syntax
Parameters
-
TsGeneratorOutputoutput - The type of definitions to generate
Returns
-
string - TypeScript definition for types included in this model builder.
TypeScriptFluent.Generate method
Generates TypeScript definitions for types included in this model builder.
Syntax
Returns
-
string - TypeScript definition for types included in this model builder.
TypeScriptFluent.WithConvertor<TFor> method
Registers a converter for the specific type
Syntax
Parameters
-
TypeConvertorconvertor - The converter to register
Returns
-
TypeScriptFluent - Instance of the TypeScriptFluent that enables fluent configuration.
TypeScriptFluent.WithFormatter method
Registers a formatter for member identifiers
Syntax
Parameters
-
TsMemberIdentifierFormatterformatter - The formatter to register
Returns
-
TypeScriptFluent - Instance of the TypeScriptFluent that enables fluent configuration.
TypeScriptFluent.WithFormatter method
Registers a formatter for member types
Syntax
Parameters
-
TsMemberTypeFormatterformatter - The formatter to register
Returns
-
TypeScriptFluent - Instance of the TypeScriptFluent that enables fluent configuration.
TypeScriptFluent.WithFormatter method
Registers a formatter for module names
Syntax
Parameters
-
TsModuleNameFormatterformatter - The formatter to register
Returns
-
TypeScriptFluent - Instance of the TypeScriptFluent that enables fluent configuration.
TypeScriptFluent.WithFormatter method
Registers a formatter for the the TsClass type.
Syntax
Parameters
-
TsTypeFormatterformatter - The formatter to register
Returns
-
TypeScriptFluent - Instance of the TypeScriptFluent that enables fluent configuration.
TypeScriptFluent.WithFormatter<TFor> method
Registers a formatter for the specific type
Syntax
Parameters
-
TsTypeFormatterformatter - The formatter to register
Returns
-
TypeScriptFluent - Instance of the TypeScriptFluent that enables fluent configuration.
TypeScriptFluent.WithIndentation method
Sets a string for single indentation level in the output
Syntax
Parameters
-
stringindentationString - The string used for the single indentation level.
TypeScriptFluent.WithReference method
Registers a typescript reference file
Syntax
Parameters
-
stringreference - Name of the d.ts typescript reference file
TypeScriptFluent.WithVisibility method
Registers a formatter for type visibility
Syntax
Parameters
-
TsTypeVisibilityFormatterformatter - The formatter to register
Returns
-
TypeScriptFluent - Instance of the TypeScriptFluent that enables fluent configuration.