Skip to content
This repository has been archived by the owner on May 2, 2021. It is now read-only.

external modules imported and written wrongly #13

Open
skaneprime opened this issue May 2, 2021 · 1 comment
Open

external modules imported and written wrongly #13

skaneprime opened this issue May 2, 2021 · 1 comment

Comments

@skaneprime
Copy link

Code:

await dtsBuilder.generateBundles([
        {
            name: 'discord-basebot',
            sourceDir: '../out/bin/typings',
            destDir: '../out/bin',
            externals: [
                '..\\node_modules\\@discordjs\\collection\\dist\\index.d.ts',
                '..\\node_modules\\@types\\chalk-animation\\index.d.ts',
                '..\\node_modules\\discord.js\\typings\\index.d.ts'
            ],
        }
    ]);

The first issue. If there external modules (for ex: node_modules) which ends with index.d.ts then all files will be written as index.d.ts.
How to import node_modules so we can use them?

The second issue.
Client.d.ts which was generated by tsc

import Discord from "discord.js";

export declare class Client extends Discord.Client { /* ...code */}

When I use dts-builder in generated declaration file my-module-name.d.ts there's no import Discord from "discord.js"; so Client class has any type
How to solve this?
image

@nomaed
Copy link
Owner

nomaed commented May 2, 2021

Sorry, this is an old project and no longer maintained. There are better tools out there today than there were back in ~2016.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants