Skip to content

Module: twoslash does not support tsconfig.json "paths" which is an object #1555

@mmorearty

Description

@mmorearty

I can't find any way to get twoslash to support the "paths" property of tsconfig.json. It seems like there is code that's intended to work with object; see here. However, when I put this in a twoslash document, I get an error:

// @paths: { "*": [ "*", "lib/*" ] }

E.g. if you try that on bug workbench, you get this:

TypeError: r.get is not a function
    at c (https://www.typescriptlang.org/17821066377c4486a980330106160c805ea5b4a9-3746668446b11083d639.js:1:1685)
    at i (https://www.typescriptlang.org/17821066377c4486a980330106160c805ea5b4a9-3746668446b11083d639.js:1:2360)
    at f (https://www.typescriptlang.org/17821066377c4486a980330106160c805ea5b4a9-3746668446b11083d639.js:1:2481)
    at https://www.typescriptlang.org/17821066377c4486a980330106160c805ea5b4a9-3746668446b11083d639.js:1:4204
    at g (https://www.typescriptlang.org/17821066377c4486a980330106160c805ea5b4a9-3746668446b11083d639.js:1:4244)
    at j (https://www.typescriptlang.org/component---src-pages-dev-bug-workbench-tsx-52a0293ef52c1fc9cf74.js:1:5437)
    at https://www.typescriptlang.org/component---src-pages-dev-bug-workbench-tsx-52a0293ef52c1fc9cf74.js:1:4882
    at n (https://www.typescriptlang.org/17821066377c4486a980330106160c805ea5b4a9-3746668446b11083d639.js:1:23019)

I tried every variation on the directive that I could think of. Looking at the code, I think it's probably a bug.

cc @d-fischer , who I think did some recent work on this code in this commit

Metadata

Metadata

Assignees

No one assigned

    Labels

    ModuleAn issue about one of our hosted npm modulesYou Can Do ThisA ticket which has been greenlighted as will be accepted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions