Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TSDX's own typedefs in order to use in tsdx.config.js with JSDoc #822

Open
cncolder opened this issue Aug 23, 2020 · 0 comments · May be fixed by #823
Open

Add TSDX's own typedefs in order to use in tsdx.config.js with JSDoc #822

cncolder opened this issue Aug 23, 2020 · 0 comments · May be fixed by #823
Labels
kind: feature New feature or request scope: integration Related to an integration, not necessarily to core (but could influence core)
Milestone

Comments

@cncolder
Copy link

cncolder commented Aug 23, 2020

Current Behavior

TSDX is a zero-config CLI that helps you develop, test, and publish modern TypeScript packages

But tsdx missing .d.ts files itself. Even cannot require it.

Desired Behavior

Bundle .d.ts aside .js
Make tsdx require-able

Suggested Solution

Add "declaration": true to tsconfig.json
Add main and types fields to package.json

Who does this impact? Who is this for?

TSDX config file is js only. But user can active IntelliSense by JSDoc comments.

const rollup = require('rollup')
const tsdx = require('tsdx')

module.exports = {
    /**
     * @param {rollup.RollupOptions} config
     * @param {tsdx.TsdxOptions} options
     */
    rollup(config, options) {
        config.plugins.push({
            name: 'abc',
        })

        return config
    },
}

Describe alternatives you've considered

Send pr to @types/tsdx. But it's not a good idea. Because tsdx source code is typescript.

Additional context

cncolder added a commit to cncolder/tsdx that referenced this issue Aug 23, 2020
- generate type difinition files
- tsdx is requireable now
  - so user can put `TsdxOptions` into tsdx.config.js JSDoc
@agilgur5 agilgur5 changed the title Bundle .d.ts into npm and add main/types fields Add TSDX's own typedefs in order to use in tsdx.config.js with JSDoc Aug 23, 2020
@agilgur5 agilgur5 added kind: feature New feature or request scope: integration Related to an integration, not necessarily to core (but could influence core) labels Aug 23, 2020
@agilgur5 agilgur5 linked a pull request Aug 23, 2020 that will close this issue
@agilgur5 agilgur5 added this to the v0.14.x milestone Oct 5, 2020
agilgur5 pushed a commit to cncolder/tsdx that referenced this issue Oct 12, 2020
- generate type difinition files
- tsdx is requireable now
  - so user can put `TsdxOptions` into tsdx.config.js JSDoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: feature New feature or request scope: integration Related to an integration, not necessarily to core (but could influence core)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants