openlang

Why is TsLint requesting a return type for this function's callSignature?

My code includes the following function:

  haltLink = (operation: string = null) => {
      this.operation[operation] = false;
      this.linkActive = false;
      this.linkDetails = false;
  }

TsLint reports this error for it:

  Message 6   TsLint: expected callSignature to have a typedef.

Could somebody clarify the message for me?

The conversation continues 2

Follow the reasoning
  1. Permalink

    To prevent that compilation error. put something like this in your tslint.json file:-

      "typedef": [
        false,
        "call-signature"
      ],

    With this setting in tslint.json, a method's return type is no longer mandatory.

Other sides of the same question

  1. Can gdb set a breakpoint for an assembly instruction using its address?

    My attempt: apparently this command does not exist, though. Can gdb do something like this?

    Replies 2Latest activity assembly
  2. Can Playwright assertions allow either of two possible text values?

    I'd like to verify that the text contains either one or two: Can this be made to work in Playwright? Could the same thing als…

    Replies 2Latest activity typescript
  3. Getting Godot system time for a digital clock?

    I'm building a digital clock for my game, so I need the present time (hours and minutes) displayed like this: HH:MM:SS Where…

    Replies 2Latest activity gdscript