Skip to content

TSC: Type 'boolean' is not assignable to type 'false'. #4

@pygy

Description

@pygy

Hello @gilbert, I'm scouring github, looking for packages with a dependency on ospec, which is why I've tried to install this.

After a git clone, npm i or npm run build give the following error:

src/parser.ts:460:43 - error TS2769: No overload matches this call.
  [...snip...]
  Type 'boolean' is not assignable to type 'false'.
460   return Object.keys(block.schema).reduce((acc, key) => {

An explicit acc: boolean is enough to fix it. I haven't used TS in a while, I'm surprised it infers false rather than boolean when you pass a false literal...

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