Skip to content

Optional chaining for provider with function call results in an SyntaxError #612

@Ventrae

Description

@Ventrae

Optional chaining for provider with function call results in an error:

SyntaxError: Invalid left-hand side in assignment

example:

@rpc.controller(AppNotificationRPC).strictSerialization(false).logValidationErrors(true)
class MyController {
    constructor (private myService: MyService) { } 

    @rpc.action()
    doSomething(){
        this.myService?.itsFunction().catch();
    }
}

perhaps solution is converting it first to a temp variable, like:

(p1 = this.myService?.itsFunction, p1.Ω = [...], p1)(...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions