Skip to content

Commit

Permalink
Merge pull request #156 from cocopon/refactor-comments
Browse files Browse the repository at this point in the history
Refactor comments
  • Loading branch information
cocopon authored Feb 24, 2021
2 parents fd03ff0 + 7218638 commit 800cdb3
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 14 deletions.
8 changes: 2 additions & 6 deletions lib/plugin/blade/common/model/blade-rack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,9 @@ export class BladeRack {
bc.blade.emitter.on('change', this.onListItemLayout_);

if (bc instanceof InputBindingController) {
const emitter = bc.binding.emitter;
// TODO: Find more type-safe way
(emitter.on as any)('change', this.onItemInputChange_);
bc.binding.emitter.on('change', this.onItemInputChange_);
} else if (bc instanceof MonitorBindingController) {
const emitter = bc.binding.emitter;
// TODO: Find more type-safe way
emitter.on('update', this.onItemMonitorUpdate_);
bc.binding.emitter.on('update', this.onItemMonitorUpdate_);
} else if (bc instanceof FolderController) {
bc.folder.emitter.on('change', this.onItemFolderFold_);

Expand Down
2 changes: 0 additions & 2 deletions lib/plugin/common/binding/input-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ describe(InputBinding.name, () => {
};
const target = new BindingTarget(obj, 'foo');
const value = new Value(0);
// tslint:disable-next-line:no-unused-expression
new InputBinding({
reader: numberFromUnknown,
target: target,
Expand All @@ -53,7 +52,6 @@ describe(InputBinding.name, () => {
const obj: {foo?: string} = {};
const target = new BindingTarget(obj, 'foo');
const value = new Value(0);
// tslint:disable-next-line:no-unused-expression
new InputBinding({
reader: numberFromUnknown,
target: target,
Expand Down
2 changes: 0 additions & 2 deletions lib/plugin/common/binding/monitor-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ describe(MonitorBinding.name, () => {
const target = new BindingTarget(obj, 'foo');
const value = new Value([0] as Buffer<number>);
const ticker = new ManualTicker();
// tslint:disable-next-line:no-unused-expression
new MonitorBinding({
reader: numberFromUnknown,
target: target,
Expand Down Expand Up @@ -66,7 +65,6 @@ describe(MonitorBinding.name, () => {
const target = new BindingTarget(obj, 'foo');
const value = new Value([0] as Buffer<number>);
const ticker = new ManualTicker();
// tslint:disable-next-line:no-unused-expression
new MonitorBinding({
reader: numberFromUnknown,
target: target,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ describe('StringColorParser', () => {
});
});

// tslint:disable:object-literal-sort-keys
[
{
input: '#112233',
Expand Down
3 changes: 0 additions & 3 deletions lib/plugin/input-bindings/color/model/color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,11 @@ export class Color {

public toRgbaObject(): RgbaColorObject {
const rgbComps = this.getComponents('rgb');

// tslint:disable:object-literal-sort-keys
return {
r: rgbComps[0],
g: rgbComps[1],
b: rgbComps[2],
a: rgbComps[3],
};
// tslint:enable:object-literal-sort-keys
}
}

0 comments on commit 800cdb3

Please sign in to comment.