Skip to content
This repository was archived by the owner on Dec 25, 2018. It is now read-only.

Commit 7604973

Browse files
author
Oren (electricessence)
committed
Fixes to StringBuilder. Added tests.
1 parent a27f883 commit 7604973

26 files changed

+79
-105
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript-dotnet",
3-
"version": "4.9.10",
3+
"version": "4.9.11",
44
"ignore": [
55
".bowercc",
66
".gitignore",

dist/amd/System/Text/StringBuilder.d.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,8 @@
44
* Licensing: MIT https://github.com/electricessence/TypeScript.NET/blob/master/LICENSE.md
55
*/
66
import { IDisposable } from "../Disposable/IDisposable";
7-
/*****************************
8-
* IMPORTANT NOTES ABOUT PERFORMANCE:
9-
* http://jsperf.com/string-concatenation-looped
10-
* http://jsperf.com/adding-strings-to-an-array
11-
* http://jsperf.com/string-concatenation-versus-array-operations-with-join
12-
*
13-
* It is clearly inefficient to use a StringBuilder or LinkedList to build a string when you have a small set of string portions.
14-
* StringBuilder will really show it's benefit likely somewhere above 1000 items.
15-
*****************************/
167
export declare class StringBuilder implements IDisposable {
17-
private _partArray;
8+
private readonly _partArray;
189
private _latest;
1910
constructor(...initial: any[]);
2011
private appendSingle(item);
@@ -34,7 +25,7 @@ export declare class StringBuilder implements IDisposable {
3425
}
3526
/**/
3627
readonly isEmpty: boolean;
37-
toString(): string | null;
28+
toString(): string;
3829
join(delimiter: string): string;
3930
clear(): void;
4031
dispose(): void;

dist/amd/System/Text/StringBuilder.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/amd/System/Text/StringBuilder.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/amd/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript-dotnet-amd",
3-
"version": "4.9.10",
3+
"version": "4.9.11",
44
"license": "MIT",
55
"author": "electricessence <[email protected]>",
66
"description": "A JavaScript-Friendly .NET Based TypeScript Library.",

dist/commonjs/System/Text/StringBuilder.d.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,8 @@
44
* Licensing: MIT https://github.com/electricessence/TypeScript.NET/blob/master/LICENSE.md
55
*/
66
import { IDisposable } from "../Disposable/IDisposable";
7-
/*****************************
8-
* IMPORTANT NOTES ABOUT PERFORMANCE:
9-
* http://jsperf.com/string-concatenation-looped
10-
* http://jsperf.com/adding-strings-to-an-array
11-
* http://jsperf.com/string-concatenation-versus-array-operations-with-join
12-
*
13-
* It is clearly inefficient to use a StringBuilder or LinkedList to build a string when you have a small set of string portions.
14-
* StringBuilder will really show it's benefit likely somewhere above 1000 items.
15-
*****************************/
167
export declare class StringBuilder implements IDisposable {
17-
private _partArray;
8+
private readonly _partArray;
189
private _latest;
1910
constructor(...initial: any[]);
2011
private appendSingle(item);
@@ -34,7 +25,7 @@ export declare class StringBuilder implements IDisposable {
3425
}
3526
/**/
3627
readonly isEmpty: boolean;
37-
toString(): string | null;
28+
toString(): string;
3829
join(delimiter: string): string;
3930
clear(): void;
4031
dispose(): void;

dist/commonjs/System/Text/StringBuilder.js

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/commonjs/System/Text/StringBuilder.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/commonjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript-dotnet-commonjs",
3-
"version": "4.9.10",
3+
"version": "4.9.11",
44
"license": "MIT",
55
"author": "electricessence <[email protected]>",
66
"description": "A JavaScript-Friendly .NET Based TypeScript Library.",

dist/es6/System/Text/StringBuilder.d.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,8 @@
44
* Licensing: MIT https://github.com/electricessence/TypeScript.NET/blob/master/LICENSE.md
55
*/
66
import { IDisposable } from "../Disposable/IDisposable";
7-
/*****************************
8-
* IMPORTANT NOTES ABOUT PERFORMANCE:
9-
* http://jsperf.com/string-concatenation-looped
10-
* http://jsperf.com/adding-strings-to-an-array
11-
* http://jsperf.com/string-concatenation-versus-array-operations-with-join
12-
*
13-
* It is clearly inefficient to use a StringBuilder or LinkedList to build a string when you have a small set of string portions.
14-
* StringBuilder will really show it's benefit likely somewhere above 1000 items.
15-
*****************************/
167
export declare class StringBuilder implements IDisposable {
17-
private _partArray;
8+
private readonly _partArray;
189
private _latest;
1910
constructor(...initial: any[]);
2011
private appendSingle(item);
@@ -34,7 +25,7 @@ export declare class StringBuilder implements IDisposable {
3425
}
3526
/**/
3627
readonly isEmpty: boolean;
37-
toString(): string | null;
28+
toString(): string;
3829
join(delimiter: string): string;
3930
clear(): void;
4031
dispose(): void;

0 commit comments

Comments
 (0)