Skip to content

Cannot add specDone after upgrade to later @types/jasmine #697

Description

@sebaKwiat

Check with "x":

Current behavior
I cannot add SpecDone to jasmine.getEnv().addReporter this seemd to broke after upgrade to later jasmine.
Previously I had jasmine 3.6.3 looks like upgrade to later @types/jasmine is causing this.

image

(method) jasmine.CustomReporter.specDone?(result: jasmine.SpecResult, done?: (() => void) | undefined): void | Promise
Type '(result: SpecResult, specDone: (() => void) | undefined) => Promise | undefined' is not assignable to type '(result: SpecResult, done?: (() => void) | undefined) => void | Promise'.
Type 'Promise | undefined' is not assignable to type 'void | Promise'.
Type 'Promise' is not assignable to type 'void | Promise'.
Type 'Promise' is missing the following properties from type 'Promise': [Symbol.toStringTag], finallyts(2322)
index.d.ts(1042, 9): The expected type comes from property 'specDone' which is declared here on type 'CustomReporter'

"@types/jasmine": "^3.10.3",
"jasmine": "^3.99.0",
"jasmine-reporters": "^2.5.0",
"jasmine-spec-reporter": "^7.0.0",

Expected behavior

Minimal reproduction of the problem with instructions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions