Class TsWriter
- Namespace
- TypedRest.CodeGeneration.TypeScript.Model
- Assembly
- TypedRest.CodeGeneration.TypeScript.dll
Writes indented TypeScript code.
public sealed class TsWriter
- Inheritance
-
objectTsWriter
Remarks
Always writes \n line endings and indents with two spaces, as mandated by the EditorConfig.
Constructors
TsWriter(TextWriter)
Writes indented TypeScript code.
public TsWriter(TextWriter writer)
Parameters
writerTextWriterThe underlying writer.
Remarks
Always writes \n line endings and indents with two spaces, as mandated by the EditorConfig.
Methods
Indent()
Increases the indentation level until the returned value is disposed.
public IDisposable Indent()
Returns
WriteDocComment(string?, bool)
Writes a JSDoc comment, if there is anything to write.
public void WriteDocComment(string? summary, bool deprecated = false)
Parameters
WriteLine(string)
Writes a line of code at the current indentation level.
public void WriteLine(string text = "")
Parameters
textstring