##// END OF EJS Templates
added provided and configure methods to the fluent container configuration, added applyConfig method to the container
added provided and configure methods to the fluent container configuration, added applyConfig method to the container

File last commit:

r115:691199f665e0 ioc ts support
r142:be7edf08a115 v1.4.0-rc3 default
Show More
TextWriterBase.ts
46 lines | 1.3 KiB | video/mp2t | TypeScriptLexer
/ src / main / ts / text / TextWriterBase.ts
cin
StringBuilder, TextWriter, ConsoleWriter tests
r82 import { TextWriter } from "../interfaces";
import { FormatCompiler } from "./FormatCompiler";
import { isString, argumentNotNull } from "../safe";
import { Converter } from "./Converter";
export abstract class TextWriterBase implements TextWriter {
private _converter: Converter;
constructor(converter = Converter.default) {
argumentNotNull(converter, "converter");
this._converter = converter;
}
writeNewLine() {
this.writeValue("\n");
}
write(obj: any): void;
write(format: string, ...args: any[]): void;
write(format: any, ...args: any[]): void {
if (args.length) {
cin
corrected code to support ts strict mode...
r115 const compiled = FormatCompiler.compile(format);
cin
StringBuilder, TextWriter, ConsoleWriter tests
r82 compiled(this, args);
} else {
this.writeValue(format);
}
}
writeLine(obj?: any): void;
writeLine(format: string, ...args: any[]): void;
writeLine(): void {
if (arguments.length)
cin
corrected code to support ts strict mode...
r115 this.write.apply<this, any, void>(this, arguments);
cin
StringBuilder, TextWriter, ConsoleWriter tests
r82 this.writeNewLine();
}
cin
corrected code to support ts strict mode...
r115 writeValue(value: any, spec?: string) {
cin
StringBuilder, TextWriter, ConsoleWriter tests
r82 this.writeText(
isString(value) ?
value :
this._converter.convert(value, spec)
);
}
cin
corrected code to support ts strict mode...
r115 abstract writeText(text: string): void;
cin
StringBuilder, TextWriter, ConsoleWriter tests
r82 }