question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Toolbelt module not exported in index.d.ts

See original GitHub issue

I tried to update the library to v6 In my project, but the submodule imports like import Maybe from "true-myth/maybe" or import Toolbelt from "true-myth/toolbelt" are not working with my ts configuration. Here is my ts-config for reference:

{
    "compilerOptions": {
        "outDir": "./dist",
        "noImplicitAny": true,
        "module": "es6",
        "moduleResolution": "node",
        "target": "es5",
        "jsx": "react",
        "allowJs": true,
        "declaration": true,
        "strict": true,
        "noUnusedLocals": true,
        "noUnusedParameters": true,
        "skipLibCheck": true,
        "esModuleInterop": true,
        "lib": ["DOM", "ES5", "ES2015", "ES2015.Promise"]
    },
    "include": ["src/**/*"],
    "exclude": ["node_modules", "dist", "src/**/*.test.tsx", "src/**/*.test.ts"]
}

Importing the Maybe and Result modules directly like import { Maybe, Result } from "true-myth" is working fine, however I checked the index.d.ts file and it does not re-export the Toolbelt module:

export { Maybe } from './maybe.js';
export { Result } from './result.js';
export { Unit } from './unit.js';
//# sourceMappingURL=index.d.ts.map

The bottom line is that I need to use the functions that were moved to the toolbelt module, it would be great if it was available as a direct import. If not, I’d appreciate a hint on how to make it possible to use the submodule imports

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:7
  • Comments:7

github_iconTop GitHub Comments

1reaction
chriskrychocommented, Jul 8, 2022

Published as 6.1.0!

1reaction
bmakuhcommented, Jul 6, 2022

I agree on the idea of re-exporting—that seems like a pretty straightforward move for the time being!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when building since last deploy (9.1.7) #173 - GitHub
I get a typescript error when building my project since the last deploy: /node_modules/easy-peasy/node_modules/ts-toolbelt/out/index.d.ts ...
Read more >
ts-toolbelt giving errors on node_modules. Type alias ...
I'm at the point where I'm not looking for a solution right away but at least some guidance on where to look and...
Read more >
I'd love to use deno, but I really don't understand the point ...
Importing everything into one scope and then re-exporting from one file just seems like an awful hack. What do you do if two...
Read more >
String/Split | ts-toolbelt
Preparing search index... The search index is not available. ts-toolbelt. Options. All. Public; Public/Protected; All. Inherited Externals Only exported.
Read more >
ts-toolbelt/community - Gitter
I'd like to look at all types of the category Object . I scroll down the index list and select the first entry...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found