Table of Contents

Class TsBarrelFile

Namespace
TypedRest.CodeGeneration.TypeScript.Model
Assembly
TypedRest.CodeGeneration.TypeScript.dll

A generated TypeScript file that re-exports everything from a set of other generated modules.

public sealed class TsBarrelFile : IGeneratedFile
Inheritance
object
TsBarrelFile
Implements
Extension Methods

Constructors

TsBarrelFile(string, IEnumerable<TsModule>)

A generated TypeScript file that re-exports everything from a set of other generated modules.

public TsBarrelFile(string path, IEnumerable<TsModule> modules)

Parameters

path string

The path of the file relative to the output directory, e.g. index.ts.

modules IEnumerable<TsModule>

The modules to re-export, in the order they should appear.

Properties

Encoding

The encoding to use when writing the file to disk.

public Encoding Encoding { get; }

Property Value

Encoding

Modules

The modules re-exported by this file.

public IReadOnlyList<TsModule> Modules { get; }

Property Value

IReadOnlyList<TsModule>

Path

The path of the file relative to the output directory, using / as the separator, including the extension.

public string Path { get; }

Property Value

string

Methods

WriteTo(TextWriter)

Writes the content of the file.

public void WriteTo(TextWriter textWriter)

Parameters

textWriter TextWriter