Skip to content

Commit

Permalink
make tslint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
ml054 committed Nov 24, 2021
1 parent fb3c01a commit 3e1b1d3
Show file tree
Hide file tree
Showing 12 changed files with 335 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/Documents/Indexes/AbstractGenericIndexCreationTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export abstract class AbstractGenericIndexCreationTask<TField extends string = s
this.indexSuggestions.add(field);
}

// tslint:disable-next-line:function-name
protected addAssembly(assembly: AdditionalAssembly) {
if (!assembly) {
throwError("InvalidArgumentException", "Assembly cannot be null");
Expand Down
2 changes: 1 addition & 1 deletion src/Documents/Session/SessionTimeSeriesBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ export class SessionTimeSeriesBase {
}

private _registerIncludes(details: TimeSeriesDetails) {
for (let rangeResult of details.values.get(this.name)) {
for (const rangeResult of details.values.get(this.name)) {
this._handleIncludes(rangeResult);
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/Documents/Session/Tokens/TimeSeriesIncludesToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ export class TimeSeriesIncludesToken extends QueryToken {
}

if ("count" in this._range) {
TimeSeriesIncludesToken.writeCountRangeTo(writer, this._range);
TimeSeriesIncludesToken._writeCountRangeTo(writer, this._range);
} else if ("time" in this._range) {
TimeSeriesIncludesToken.writeTimeRangeTo(writer, this._range);
TimeSeriesIncludesToken._writeTimeRangeTo(writer, this._range);
} else if ("from" in this._range && "to" in this._range) {
TimeSeriesIncludesToken.writeRangeTo(writer, this._range);
TimeSeriesIncludesToken._writeRangeTo(writer, this._range);
} else {
throwError("InvalidArgumentException", "Not supported time range type: " + this._range);
}
Expand All @@ -61,7 +61,7 @@ export class TimeSeriesIncludesToken extends QueryToken {
.append(")");
}

private static writeTimeRangeTo(writer: StringBuilder, range: TimeSeriesTimeRange) {
private static _writeTimeRangeTo(writer: StringBuilder, range: TimeSeriesTimeRange) {
switch (range.type) {
case "Last":
writer
Expand All @@ -78,7 +78,7 @@ export class TimeSeriesIncludesToken extends QueryToken {
.append("')");
}

private static writeCountRangeTo(writer: StringBuilder, range: TimeSeriesCountRange) {
private static _writeCountRangeTo(writer: StringBuilder, range: TimeSeriesCountRange) {
switch (range.type) {
case "Last":
writer
Expand All @@ -93,7 +93,7 @@ export class TimeSeriesIncludesToken extends QueryToken {
.append(")");
}

private static writeRangeTo(writer: StringBuilder, range: TimeSeriesRange) {
private static _writeRangeTo(writer: StringBuilder, range: TimeSeriesRange) {
if (range.from) {
writer
.append("'")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ export interface ServerWideTaskResponse {
}


// tslint:disable-next-line:no-empty-interface
export interface PutServerWideBackupConfigurationResponse extends ServerWideTaskResponse {
}

// tslint:disable-next-line:no-empty-interface
export interface ServerWideExternalReplicationResponse extends ServerWideTaskResponse {
}
1 change: 1 addition & 0 deletions src/Utility/ObjectUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export class ObjectUtil {
}
} else if (TypeUtil.isObject(item)) {
result = {};
// tslint:disable-next-line:forin
for (const prop in item) {
result[prop] = ObjectUtil.deepLiteralClone(item[prop]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ class MyCounterIndex extends AbstractRawJavaScriptCountersIndexCreationTask {
}


// tslint:disable-next-line:class-name
class AverageHeartRate_WithLoad extends AbstractRawJavaScriptCountersIndexCreationTask {

constructor() {
Expand All @@ -305,12 +306,14 @@ class AverageHeartRate_WithLoad extends AbstractRawJavaScriptCountersIndexCreati
}
}

// tslint:disable-next-line:class-name
class AverageHeartRate_WithLoadResult {
public heartBeat: number;
public city: string;
public count: number;
}

// tslint:disable-next-line:class-name
class MyCounterIndex_AllCounters extends AbstractRawJavaScriptCountersIndexCreationTask {
public constructor() {
super();
Expand Down Expand Up @@ -361,6 +364,7 @@ class MyMultiMapCounterIndexResult {
public user: string;
}

// tslint:disable-next-line:class-name
class Companies_ByCounterNames extends AbstractRawJavaScriptCountersIndexCreationTask {
public constructor() {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ describe("BasicTimeSeriesIndexes_JavaScript", function () {
});
});

// tslint:disable-next-line:class-name
class MyTsIndex_AllTimeSeries extends AbstractRawJavaScriptTimeSeriesIndexCreationTask {
public constructor() {
super();
Expand All @@ -285,6 +286,7 @@ class MyTsIndex_AllTimeSeries extends AbstractRawJavaScriptTimeSeriesIndexCreati
}
}

// tslint:disable-next-line:class-name
class MyTsIndex_Load extends AbstractRawJavaScriptTimeSeriesIndexCreationTask {
public constructor() {
super();
Expand All @@ -300,13 +302,15 @@ class MyTsIndex_Load extends AbstractRawJavaScriptTimeSeriesIndexCreationTask {
}
}

// tslint:disable-next-line:class-name
class AverageHeartRateDaily_ByDateAndCityResult {
public heartBeat: number;
public date: string;
public city: string;
public count: number;
}

// tslint:disable-next-line:class-name
class AverageHeartRateDaily_ByDateAndCity extends AbstractRawJavaScriptTimeSeriesIndexCreationTask {
public constructor() {
super();
Expand Down Expand Up @@ -366,6 +370,7 @@ class MyMultiMapTsIndex extends AbstractRawJavaScriptTimeSeriesIndexCreationTask
}
}

// tslint:disable-next-line:class-name
class Companies_ByTimeSeriesNames extends AbstractRawJavaScriptIndexCreationTask {
public constructor() {
super();
Expand Down
1 change: 1 addition & 0 deletions test/Ported/Issues/RavenDB_16328_Analyzers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class MyIndex extends AbstractJavaScriptIndexCreationTask<Customer> {
}


// tslint:disable-next-line:variable-name
export const RavenDB_16328_Analyzer = "using System.IO;\n" +
"using Lucene.Net.Analysis;\n" +
"using Lucene.Net.Analysis.Standard;\n" +
Expand Down
2 changes: 1 addition & 1 deletion test/Ported/Issues/RavenDB_16367.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ describe("RavenDB_16367Test", function () {
const databaseName = store.database + "_LockMode_1";

await store.maintenance.server.send(new CreateDatabaseOperation({
databaseName: databaseName
databaseName
}));

await assertLockMode(store, databaseName, "Unlock");
Expand Down
2 changes: 1 addition & 1 deletion test/Ported/LoadTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe("LoadTest - ported", function () {
it("load_Document_And_Expect_Null_User", async function () {
{
const session = store.openSession();
let nullId: string;
const nullId: string = undefined;
const user1 = await session.load(nullId, User);
assertThat(user1)
.isNull();
Expand Down
Loading

0 comments on commit 3e1b1d3

Please sign in to comment.