0

Thoughts on why the following is invalid syntactically?

@foo(@bar('/test', {
      password
      username
      _method: 'GET'
    }
  )
)

1 Answer 1

1

The problem is the indentation.

The second parenthesis couldn't be read properly. If you make an indent explicitly for it, it work.

@foo(
  @bar('/test', {
      password
      username
      _method: 'GET'
    }
  )
)

Or remove indentation of the closing parenthesis.

@foo(@bar('/test', {
    password
    username
    _method: 'GET'
  }
))

both of them works as

this.foo(this.bar('/test', {
  password: password,
  username: username,
  _method: 'GET'
}));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.