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

Type type
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

Assembly assembly
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

TsGeneratorOutput output
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

TypeConvertor convertor
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

TsMemberIdentifierFormatter formatter
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

TsMemberTypeFormatter formatter
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

TsModuleNameFormatter formatter
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

TsTypeFormatter formatter
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

TsTypeFormatter formatter
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

string indentationString
The string used for the single indentation level.

TypeScriptFluent.WithReference method

Registers a typescript reference file

Syntax

Parameters

string reference
Name of the d.ts typescript reference file

TypeScriptFluent.WithVisibility method

Registers a formatter for type visibility

Syntax

Parameters

TsTypeVisibilityFormatter formatter
The formatter to register

Returns

TypeScriptFluent
Instance of the TypeScriptFluent that enables fluent configuration.