Skip to content

Commit 77f456f

Browse files
committed
code cleanup
1 parent 85a3dc0 commit 77f456f

File tree

11 files changed

+1
-74
lines changed

11 files changed

+1
-74
lines changed

src/Documents/Commands/Batches/BatchCommand.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -105,21 +105,6 @@ export class BatchCommand extends RavenCommand<BatchCommandResult> implements ID
105105
}
106106

107107
return request;
108-
/* TBD: attachments - TODO: delete me?
109-
110-
if (_attachmentStreams != null && _attachmentStreams.Count > 0)
111-
{
112-
var multipartContent = new MultipartContent {request.Content};
113-
foreach (var stream in _attachmentStreams)
114-
{
115-
PutAttachmentCommandHelper.PrepareStream(stream);
116-
var streamContent = new AttachmentStreamContent(stream, CancellationToken);
117-
streamContent.Headers.TryAddWithoutValidation("Command-Type", "AttachmentStream");
118-
multipartContent.Add(streamContent);
119-
}
120-
request.Content = multipartContent;
121-
}
122-
*/
123108
}
124109

125110
public async setResponseAsync(bodyStream: stream.Stream, fromCache: boolean): Promise<string> {

src/Documents/Commands/MultiGet/GetRequest.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
//TODO: fill missing JSDocs?
21
export class GetRequest {
32
private _url: string;
43
private _headers: { [key: string]: string | string[] };

src/Documents/Conventions/DocumentConventions.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export class DocumentConventions {
4545
private _frozen: boolean;
4646
private _originalConfiguration: ClientConfiguration;
4747
private _idPropertyCache: Map<ObjectTypeDescriptor, string> = new Map(); //TODO: is it used?
48-
// TODO: private _saveEnumsAsIntegers: number;
4948
private _identityPartsSeparator: string;
5049
private _disableTopologyUpdates: boolean;
5150

@@ -457,10 +456,6 @@ export class DocumentConventions {
457456
return this;
458457
}
459458

460-
//TODO public registerEntityTypeChecker(typeChecker: ObjectLiteralDescriptor) {
461-
// this._registeredTypeDescriptors.push(typeChecker);
462-
// }
463-
464459
public registerEntityIdPropertyName(ctorOrTypeChecker: ObjectTypeDescriptor, idProperty: string) {
465460
this._registeredIdPropertyNames.set(ctorOrTypeChecker, idProperty);
466461
}

src/Documents/Identity/IHiloIdGenerator.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { DocumentConventions } from "../Conventions/DocumentConventions";
22

33
export interface IHiloIdGenerator {
4-
//TODO ? nextId(...args: Array<object | string | string>): Promise<number>;
54
generateDocumentId(...args: any[]): Promise<string>;
65

76
returnUnusedRange(): Promise<void>;

src/Documents/Session/EntityToJson.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export class EntityToJson {
3737
typeInfo = _typeInfo;
3838
}, conventions.knownEntityTypesByName);
3939

40-
// TODO handle Maps
4140
if (entity instanceof SetupDocumentBase) {
4241
jsonNode = entity.toRemoteFieldNames();
4342
} else {

src/Documents/Session/Operations/Lazy/IndexQueryContent.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/Documents/Subscriptions/SubscriptionBatch.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ export class SubscriptionBatch<T extends object> {
144144

145145
if (!item.exception) {
146146
instance = curDoc;
147-
//TODO: make sure above assignment is correct when entities has custom casing
148147

149148
if (!StringUtil.isNullOrEmpty(id)) {
150149
this._generateEntityIdOnTheClient.trySetIdentity(instance, id);

src/Mapping/Json/Streams/ObjectKeyCaseTransformStream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class ObjectKeyCaseTransformStream extends stream.Transform {
3333
constructor(private _opts: ObjectKeyCaseTransformStreamOptions) {
3434
super({ objectMode: true });
3535

36-
this._opts = Object.assign({}, DEFAULT_OBJECT_KEY_CASE_TRANSFORM_OPTS, this._opts); //TODO:
36+
this._opts = Object.assign({}, DEFAULT_OBJECT_KEY_CASE_TRANSFORM_OPTS, this._opts);
3737
ObjectKeyCaseTransformStream._validateOpts(_opts);
3838

3939
if (typeof _opts.extractIgnorePaths === "function") {

src/ServerWide/Commands/GetClusterTopologyCommand.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,6 @@ export class GetClusterTopologyCommand extends RavenCommand<ClusterTopologyRespo
2121
return { uri };
2222
}
2323

24-
public setResponse(response: string, fromCache: boolean): void { //TODO: do we need this method?
25-
if (!response) {
26-
this._throwInvalidResponse();
27-
}
28-
29-
const resObj = this._serializer.deserialize<IRavenResponse>(response);
30-
const clusterTpl = Object.assign(new ClusterTopology(), resObj.topology);
31-
this.result = Object.assign(resObj as ClusterTopologyResponse, { topology: clusterTpl });
32-
}
33-
3424
public async setResponseAsync(bodyStream: stream.Stream, fromCache: boolean): Promise<string> {
3525
if (!bodyStream) {
3626
this._throwInvalidResponse();

src/ServerWide/Operations/GetDatabaseNamesOperation.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,6 @@ export class GetDatabaseNamesCommand extends RavenCommand<string[]> {
4444
return { uri };
4545
}
4646

47-
public setResponse(response: string, fromCache: boolean): void { //TODO: do we need this method?
48-
if (!response) {
49-
this._throwInvalidResponse();
50-
return;
51-
}
52-
53-
const { databases } =
54-
this._serializer.deserialize<IRavenResponse>(response) as { databases: string[] };
55-
if (!databases || !Array.isArray(databases) || !databases.length) {
56-
this._throwInvalidResponse();
57-
}
58-
59-
this.result = databases;
60-
}
61-
6247
public async setResponseAsync(bodyStream: stream.Stream, fromCache: boolean): Promise<string> {
6348
if (!bodyStream) {
6449
this._throwInvalidResponse();

0 commit comments

Comments
 (0)