Skip to content

Bug: return types of methods are not resolved by typescript #5117

@dabrpio

Description

@dabrpio

Lexical version: 0.12.2

Steps To Reproduce

  1. Set moduleResolution to something other than "node" ("Bundler" in my case) in tsconfig.json's compilerOptions

Link to code example: stackblitz

The current behavior

Some of the methods on lexical objects have return type any.

image

I know it is possible to cast it but I believe it is better to get to the root cause of this.

The expected behavior

Those methods should have proper return type.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions